HTML and CSS Reference
In-Depth Information
Listing 4-29.
Using the
mark
element in a
blockquote
<p>After several hours trying to determine why the loom wasn't
powering up, we finally read the instruction manual:</p>
<blockquote>
<p>Before initializing the fluxomolecular extrusion loom,
ensure that all interlocks are active and dynatherms are
properly connected. You may need to <mark>step on the primary
samoflange several times</mark> before it engages.</p>
</blockquote>
<p>The samoflange was the source of our trouble. Unfortunately,
none of us even knew what a “samoflange” was.</p>
When the
mark
element occurs in regular, unquoted prose, it should call attention to words or phrases that
are relevant to the user's current activities. The most common example is a page of search results, where
the terms your visitor sought are highlighted with
mark
elements. Those words might not be of special
significance in the original text as it was written, but the
mark
element points them out because they're the
words your searcher was looking for. Automated scripts or server-side applications should usually insert
such action-oriented
mark
elements, and they likely won't be part of any handcrafted markup you author
yourself.
This is a new element in HTML5 so not all browsers give it any default styling, but those that do will
typically display the contents of a
mark
with a bright yellow background color and black text color—shown
in Figure 4-17—as if the text had been marked with a highlighter pen (of course, this is printed in black and
white, but it's really yellow, honest).
Figure 4-17.
Text highlighted with the
mark
element
Required Attributes
The
mark
element doesn't require any attributes
Optional Attributes
There are no optional attributes for the
mark
element.