Do We Really Need Blockquotes in HTML
53

Do We Really Need Blockquotes in HTML?

In HTML, you can mark quotes in two different ways: using <q> or <blockquote>. They both carry the same attribute definitions (cite, etc) and they are both intended to mark up quotations in HTML documents.

So what’s the difference between the two tags? This is what the specifications say:

BLOCKQUOTE is for long quotations (block-level content) and Q is intended for short quotations (inline content) that don’t require paragraph breaks.

The doctype declaration for HTML 4 Strict confirms this:

<!ELEMENT BLOCKQUOTE - - (%block;|SCRIPT)+ -- long quotation -->
<!ELEMENT Q - - (%inline;)*            -- short inline quotation -->

The <q> tag may only contain inline elements. The <blockquote> tag may only contain block-level elements and <script> as first descendants (just like Roger taught us). Putting inline elements or plain text inside a blockquote without marking it as a paragraph will produce validation errors, and putting block-level elements inisde the q tag would be considered invalid as well.

Another difference besides the specs is that most visual user agents renders the tags differently. A blockquote is often presented with a margin on both or either side of the object. This often leads to misusing the tag as presentational markup.

When thinking about all this, it seems quite logical that something need to be done here to clean up this mess of definitions. HTML is a semantic language, right? But there seem to be no semantic difference between these two tags at all. A quote is a quote. I doubt any non-visual user agent would use separate aural definitions for them. A quote contains content, may it be text or images. Why would you want to be forced to put block-level elements inside a quote? I simply cannot see the semantic defference f.ex between these markup examples:

<blockquote><p>Quote</p></blockquote>
<p><q class="block">Quote</q></p>

As far as I see it, we need a new tag: <quote>. I would also like to see a src attribute replacing the cite for defining the target URL from which the quote is taken. It should probably be displayed inline or perhaps flow by default, since we never need to put any block-level elements inside a quotation. We also need to clear the default rendering for quotations in user agents and let the authors decide how they should be presented using style sheets.

The blockquote is a presentational model. It’s being abused and producing invalid markup without a clear semantic meaning. I say we get rid of it.