type属性用于指定链接文档的Internet媒体类型。仅在设置href属性时使用。
用法:
属性值:它包含单个值media_type,用于指定嵌入文件的Internet媒体类型。
例:
HTML area type Attribute
"https://media.geeksforgeeks.org/wp-content/uploads/20190227165729/area11.png"
alt="" width="300" height="119" class="aligncenter"
usemap="#shapemap" />
coords="59, 31, 28, 83, 91, 83"
href="https://media.geeksforgeeks.org/wp-content/uploads/20190227165802/area2.png"
alt="Triangle" type="image/png">
coords="155, 56, 26"
href="https://media.geeksforgeeks.org/wp-content/uploads/20190227165934/area3.png"
alt="Circle" type="image/png">
coords="224, 30, 276, 82"
href="https://media.geeksforgeeks.org/wp-content/uploads/20190227170021/area4.png"
alt="Square" type="image/png">
输出:
在点击特定的可点击区域之前:
单击特定的可点击区域后:
支持的浏览器:下面列出了HTML type属性支持的浏览器:
谷歌浏览器
IE浏览器
Firefox
Safari
Opera