HTML and CSS Reference
In-Depth Information
However, this is not supported in Safari.
Also, browsers should display an awareness of nested quotes (in English, if a quote
begins with the double-quote character, then quotes within that quote should use the
single-quote character, and vice versa). So, for example, the following fragment of
HTML:
<p><q>This is a quote that has a <q>nested quote</q> as
part of it.</q></p>
should display as follows:
“
This is a quote that has a 'nested quote' as
part of it.
”
While this may all sound very exciting, the reality is more humdrum. For instance,
Safari does not support this either, but the majority of other browsers do. While support
has gotten better, you may still find
q
is best left out of your toolkit for the time being,
even if it does provide a unique bit of semantics.
Handling terms: dfn and abbr
The
dfn
(definition) element is useful in marking the defining instance of a term that
will be used repeatedly throughout a document. It is often used in combination with
the
abbr
(abbreviation) element to define the first occurrence of an abbreviation or ac-
ronym for later reference. After using the
dfn
element, a definition for the term needs
to appear within the same paragraph, description list (
dl
element), or section as the
dfn
element. Usually, this equates to having the text following the closing
dfn
tag define
the term in question. In the
City Press
web page, a fictitious organization, the National
Farm Association (NFA), is wrapped in an
abbr
element and, on its first occurrence in
the text, a
dfn
element:
<dfn
id="nfa"><abbr
title="National
Farm
Associ-
ation">NFA</abbr></dfn> (National Farm
Association)
It is highly recommended that you use the
title
attribute with the
abbr
element to
provide a full-text expansion of the abbreviation when hovering over the element. Also,
the
dfn
element is given an
id
attribute that can be used to link future occurrences of
the abbreviation back to its defining instance:
<a
href="#nfa"><abbr
title="National
Farm
Associ-
ation">NFA</abbr></a>
Search WWH ::
Custom Search