HTML and CSS Reference
In-Depth Information
Wikipedia). Although it may be tempting to use the s element for text that has been
labeled deleted, there is the del element for that.
Highlighting text: mark
mark is a new element that can be used for highlighting some text for reference pur-
poses. Think of it as a highlighter marking some text in a book. It also may be used to
emphasize part of a quotation that was not emphasized in the original quote. In the City
Press web page, the mark element is used in the blockquote in the lower right to
add bold to the beginning text (by default most browsers would render content in mark
as having a yellow background, but you can use CSS to change this):
<blockquote cite="#article1">
<p><mark>We're all hoping it rains soon</mark>,
some farmers have installed
irrigation systems, at <em>considerable</em> ex-
Note Notice that a fragment identifier is used in the cite attribute of the block-
quote . This links it back to the original source article on the page, which has the at-
tribute id="article1" .
Inline quote: q
The q element is for adding inline quotes to a block of text. It is to phrasing content
what blockquote is to flow content. This element has been around for a while but
has in the past suffered from inconsistent browser support, so its use was not recommen-
ded. Things have gotten better, however, and the q element is finding wider support in
modern web browsers. The browser is supposed to automatically include typographic-
ally correct quotation marks at the beginning and end of the quote, meaning that you, the
author, should not include them. Furthermore, with judicious use of the lang attribute,
those quotes should be displayed in the style appropriate to the specified language (for
example, some European languages will use chevrons or guillemets : « and », instead of
“ and “). If that doesn't happen because of poor browser support, CSS can be used to ap-
pend the appropriate quotes using ASCII codes and the quotes property. For instance,
to append the proper quotes to a <q lang="fr"> element, use this:
q:lang(fr){ quotes: "\AB" "\BB" "\2018" "\2019"; }
Search WWH ::

Custom Search