Method C: blockquote is Best

 < Day Day Up > 



Method C: <blockquote> is Best

 <blockquote>   <p>Misquotations are the only quotations that are never misquoted.</p>   <p>&#8212; Hesketh Pearson </p> </blockquote> 

The W3C recommends using the <blockquote> element for long quotations (block-level content), and it's the element that was designed to handle the exact situation that we're discussing. By using it, we're giving structural meaning to the content, while at the same time providing a unique label for adding style for visual browsers.

Without any styling added, content within <blockquote> tags will be indented. This is a minimal, but sufficient, visual cue for separating the quotation from normal text. This default indenting, however, has given birth to a nasty habit, which we'll discuss next.

Using a Screwdriver to Hammer a Nail

You may remember using <blockquote> in the past because it was like a paragraph that was indented. If you needed to indent a block or text, you wrapped it in <blockquote> and that was that.

Unfortunately, it was a bad habit to get into, and one that's remedied by instead applying padding-left or margin-left values to the proper elements using CSS. Historically, <blockquote> has been abused in this way, being exploited more for presentational reasons, rather than for structural circumstances.

Because of this bad habit, the W3C has recommended that the rendering of quotation marks be left to the style sheet and not the default styling of the browser. We'll look at a neat way of inserting stylish quotation marks in the "Extra credit" section of this chapter.



 < Day Day Up > 



Web Standards Solutions. The Markup and Style Handbook
Web Standards Solutions: The Markup and Style Handbook (Pioneering Series)
ISBN: 1590593812
EAN: 2147483647
Year: 2003
Pages: 119
Authors: Dan Cederholm

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