HTML 사전

mark

HTML5에서 도입

설명

The HTML Mark Element (<mark>) represents highlighted text, i.e., a run of text marked for reference purpose, due to its relevance in a particular context. For example it can be used in a page showing search results to highlight every instance of the searched for word.

텍스트를 강조한다. 즉, 특정 문맥에서 관련성이 있어 이를 참조할 목적으로 텍스트를 표시하는데 쓴다.
예를들면, 검색 결과 페이지에서 검색된 해당 단어를 강조하는 데 쓸 수 있다.

참고 :
- In a quotation or another block, the highlighted text typically marks text that is referenced outside the quote, or marked for specific scrutiny even though the original author didn't consider it important.
- In the main text, the highlighted text typically marks text that may be of special relevance for the user's current activity, like search results.
- Do not use the <mark> element for syntax highlighting; use the <span> element for this purpose.
- Do not confuse the <mark> element with the <strong> element. The <strong> element is used to denote spans of text of special importance, when the <mark> element is used to denote spans of text of special relevance.

- 인용문이나 블록요소에서, <mark> 태그는 인용문 밖에서 이에 대해 언급한 경우에 해당 단어를 강조하는데 쓰인다.
  원 저자의 글에 좀 더 설명을 곁들이는 경우에 이를 표시하기도 한다.
- 본문에서 강조된 텍스트는 흔히 사용자의 현재 활동과 특별히 관련있는 단어를 표시한다. 
  검색 결과 페이지가 그런 경우로, 현재 사용자가 검색한 단어를 표시한다.
- 구문 강조에는 <mark>를 사용하지 말고 <span>을 사용한다.
- <mark> 엘리먼트를 <strong> 엘리먼트와 혼동하지 말자.
  <strong>은 중요도를 나타내고 <mark>는 관련성을 표시한다.

Usage Context

Permitted content Phrasing content
Tag omission None, both the start tag and the end tag are mandatory
Permitted parent elements Any element that accepts phrasing content.
Normative document HTML5, section 4.6.17

속성

이 엘리먼트는 전역속성을 지원한다.

예제

<p>The &lt;mark&gt; element is used to <mark>highlight</mark> text</p>
<p>mark 태그는 글자를 <mark>강조</mark>하는데 쓴다.</p>

DOM Interface

This element implements the HTMLElement interface.

호환성

Desktop
기능 구글크롬 파이어폭스Gecko) 인터넷 익스플로러 Opera Safari
기본적인 지원 지원 4.0 (2.0) 9.0 11.0 지원
Mobile
기능 안드로이드 파이어폭스 모바일(Gecko) 인터넷 익스플로러 모바일 오페라 모바일 사파리 모바일
기본적인 지원   4.0 (2.0)      

참고

댓글

댓글 본문
버전 관리
graphittie
현재 버전
선택 버전
graphittie 자세히 보기