This article is In Progress.
Represents a run of text that is contextually-important for some reason, such as text that has been marked or highlighted.
Features Chrome Firefox Internet Explorer Opera Safari Basic support
Features Android Firefox Mobile IE Mobile Opera Mobile Safari Mobile Basic support
The following example shows the difference between denoting the importance of a span of text (strong) as opposed to denoting the relevance of a span of text (mark). It is an extract from a textbook, where the extract has had the parts relevant to the exam highlighted. The safety warnings, important though they may be, are not relevant to the exam.
<h3>Wormhole Physics Introduction</h3> <p><mark>A wormhole in normal conditions can be held open for a maximum of just under 39 minutes.</mark> Conditions that can increase the time include a powerful energy source coupled to one or both of the gates connecting the wormhole, and a large gravity well (such as a black hole).</p> <p><mark>Momentum is preserved across the wormhole. Electromagnetic radiation can travel in both directions through a wormhole, but matter cannot.</mark></p> <p>When a wormhole is created, a vortex normally forms. <strong>Warning: The vortex caused by the wormhole opening will annihilate anything in its path.</strong> Vortexes can be avoided when using sufficiently advanced dialing technology.</p> <p><mark>An obstruction in a gate will prevent it from accepting a wormhole connection.</mark></p>
This example uses mark to indicate the "current" link.
<nav> <ul> <li><a href="/one">One</a></li> <li><mark><a href="/two">Two</a></mark></li> <li><a href="/three">Three</a></li> <li><a href="/four">Four</a></li> </ul> <nav>
The mark element is a phrasing-level element. It must not contain block-level elements, but it can contain other phrasing-level elements.
The mark element denotes the relevance of a span of text. By default, most browsers render it in black text on a yellow background, but you can change that with CSS.
When used in the main prose of a document, the mark element indicates a part of the document that has been highlighted. When used in a quotation or other block of text (such as an aside), it indicates a highlight that was not originally present but which has been added to bring the reader's attention to a part of the text. For example, the following are valid uses for the mark element:
- Bring attention to a particular string of text.
- Highlight parts of document that match a search string.
- Enable body text to refer to a specific part of a quotation or code fragment.
Windows Internet Explorer 9. The mark element is only supported for webpages displayed in IE9 Standards mode. For more information, see Defining Document Compatibility.
This article contains content originally from external sources.
Portions of this content come from the Microsoft Developer Network: [Windows Internet Explorer API reference Article]