<area> 요소의 type 속성은 링크된 대상 URL의 MIME(Multipurpose Internet Mail Extensions) 유형을 지정하는 역할을 합니다. 이 속성을 활용하면 브라우저가 연결된 리소스의 형식을 사전에 인식할 수 있어, 문서를 보다 효율적으로 처리할 수 있습니다.
type 속성 기본 문법
<area type="미디어_유형">
위 문법에서 '미디어_유형'은 링크된 문서의 표준 미디어 타입을 의미합니다. 예를 들어 image/bmp, image/tiff, image/png 등이 여기에 해당합니다.
그럼 <area> 요소에 type 속성을 실제로 적용한 예제를 살펴보겠습니다.
예제
<!DOCTYPE html>
<html>
<body>
<h2>Learning</h2>
<p>Learn these technologies with ease....</p>
<img src = /images/usemap.gif alt = "usemap" border = "0" usemap = "#tutorials"/>
<map name = "tutorials">
<area shape = "poly" coords = "74,0,113,29,98,72,52,72,38,27"
href = "/perl/index.htm" alt = "Perl Tutorial" download="perl" hreflang="en"/>
<area shape = "rect" coords = "22,83,126,125" alt = "HTML Tutorial"
href = "/html/images/test.png" type="image/png" />
<area shape = "circle" coords = "73,168,32" alt = "PHP Tutorial"
href = "/php/index.htm" target = "_blank" download="php" hreflang="en"/>
</map>
</body>
</html>
실행 결과

위 화면에서 이미지 맵의 HTML 영역을 클릭하면 아래와 같은 PNG 이미지가 나타납니다. 해당 영역에는 미디어 유형이 image/png로 설정되어 있기 때문입니다.
