Prev | Current Page 124 | Next

Craig Grannell

"The Essential Guide to CSS and HTML Web Design"

See the ???Creating drop caps and pull quotes using CSS??? section for
more on using this element.
For shorter quotes that are inline, the q element can be used. This is also supposed to add
language-specific quotes before and after the content between the element??™s tags. These
quotes vary by browser??”Firefox adds ???smart??? quotes, Safari and Opera add ???straight???
quotes, and Internet Explorer doesn??™t display anything at all. The article ???Long Live the Q
Tag,??? by Stacey Cordoni (available at A List Apart; www.alistapart.com/articles/qtag),
offers a few workarounds, although none are ideal (one advises using JavaScript; another
uses CSS to hide the quotes in compliant browsers, and then says to add the quotes manually,
outside of the element??™s tags. However, another alternative is to merely ensure that
the quoted content is differentiated from surrounding text, which can be done by setting
font-style in CSS to italic for the q element.
Finally, to indicate the defining instance of a term, you use the dfn element. This is used to
draw attention to the first use of such a term and is also typically displayed in italics.
Acronyms and abbreviations
Two logical styles assist with accessibility, enabling you to provide users with full forms of
abbreviations and acronyms by way of the title attribute:
CSS
NATO
This has two uses.


Pages:
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136