mark

< html‎ | elements
Jump to: navigation, search

mark



Summary

Represents a run of text that has been marked or highlighted.


Overview Table

DOM Interface HTMLElement

Examples

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>

Notes

Remarks

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. The mark element denotes the relevance of a span of text. To indicate importance, use strong or em. The default CSS for the mark element is:

color: black;
background-color: yellow;

Standards information

There are no standards that apply here.

HTML information

{

Compatibility

Desktop

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support ? ? ? ? ?

Mobile

Feature Android BlackBerry Chrome for mobile Firefox Mobile (Gecko) IE Mobile Opera Mobile Opera Mini Safari Mobile
Basic support ? ? ? ? ? ? ? ?

See also

Related pages (MSDN)

  • Reference
  • em
  • strong

Attribution

This article contains content originally from external sources.

Portions of this content come from the Microsoft Developer Network: [Windows Internet Explorer API reference Article]