<map>
HTML <map>
요소는 <area>
요소와 함께 이미지 맵(클릭 가능한 링크 영역)을 정의할 때 사용합니다.
The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
콘텐츠 카테고리 | 플로우 콘텐츠, 구문 콘텐츠, 뚜렷한 콘텐츠. |
---|---|
가능한 콘텐츠 | 모든 투명한 콘텐츠. |
태그 생략 | None, both the starting and ending tag are mandatory. |
가능한 부모 요소 | 구문 콘텐츠를 허용하는 모든 요소. |
가능한 ARIA 역할 | 없음 |
DOM 인터페이스 | HTMLMapElement (en-US) |
특성
이 요소는 전역 특성을 포함합니다.
name
- 맵을 참조할 때 사용할 수 있는 이름. 반드시 존재해야 하고, 값이 비면 안되며, 값에 공백 문자가 포함되어도 안됩니다.
name
특성은 문서 내의 모든<map>
에서 유일해야 합니다.id
특성이 존재하는 경우name
과 값이 동일해야 합니다.
예제
<map name="primary">
<area shape="circle" coords="75,75,75" href="left.html">
<area shape="circle" coords="275,75,75" href="right.html">
</map>
<img usemap="#primary" src="https://placehold.it/350x150" alt="350 x 150 pic">
결과
예상 결과
키보드의 탭을 눌렀을 때, 위의 예제는 아래 사진처럼 나와야 합니다.
left.html
링크:
right:html
링크:
명세
Specification | Status | Comment |
---|---|---|
HTML Living Standard The definition of '<map>' in that specification. |
Living Standard | |
HTML5 The definition of '<map>' in that specification. |
Recommendation | |
HTML 4.01 Specification The definition of '<map>' in that specification. |
Recommendation | Initial definition |
브라우저 호환성
BCD tables only load in the browser