Using Quote Elements


HTML gives you two tags for marking up quotations: quote and blockquote. The quote tag works with inline quotations, like the dialog in a novel, while the blockquote tag marks up offset quotes, as Figure 40.3 shows.

Figure 40.3. The quote tag is for inline quotations, while the blockquote tag is for offset quotes.


The World Wide Web Consortium (W3C) recommends that you specify the language of the quote in the lang attribute of the quote tag, like this:

[View full width]

<p>Her lip trembled. <q lang="en-us">Plastic,</q> she replied, wondering even as she said it if she should have asked for paper.</p>

TIP

The blockquote element doesn't automatically add quotation marks in any browser, nor does the HTML specification require it, so you don't have to give the language in the opening blockquote tag.


Why? Because browsers are supposed to add the quotation marks automatically, depending on the conventions of the language. (Different languages have different symbols and conventions for rendering quotation marks.) The Netscape browser adds quotes when it encounters quote tags, but Internet Explorer does not.



Web Design Garage
Web Design Garage
ISBN: 0131481991
EAN: 2147483647
Year: 2006
Pages: 202
Authors: Marc Campbell

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net