True to kind, Heydon Pickering has written one other blistering account of probably the most ubiquitous HTML components, the <blockquote>. You’ve most likely used a <blockquote> when writing HTML. I do know I’ve used actually lots of of them. What I didn’t know is that I’ve been utilizing them flawed all these years.
To pilfer a number of selection quotes from stated article:
In HTML5,
<blockquote>content material “have to be quoted from one other supply”. In order that’s pull quotes fully out of the window, then.
Heydon rightly makes the excellence between block quotes, which (supposedly) quote one other supply, and pull-quotes, which spotlight excerpts from the article you’re studying. I used to be stunned to be taught that <blockquote> components ought to not be used for pull-quotes. I’ve been utilizing them everywhere. Whoops.
…the time period “block citation” precedes the
<blockquote>ingredient and the idea of block-level HTML components. The Chicago Guide Of Fashion recommends block quotations are over 100 phrases in size, for instance.
As soon as once more, I’m doing block quotes flawed. I don’t suppose I’ve knowingly ever included a quote over 100 phrases lengthy on an internet web page. Does anybody ever learn that many phrases on the internet? You’ll discover neither of the block quotes to this point on this article are over 100 phrases in size. (To be honest, this isn’t a part of the HTML spec. However would possibly effectively affect the way you outline a “blockquote”.)
Totally different variations of various specs agree the quotation can’t be contained in the
<blockquote>ingredient.
Oh expensive. I’ve been placing a <cite> inside a <blockquote> for years. I distinctly bear in mind studying that this was a good suggestion in some unspecified time in the future within the final 10 years, and haven’t checked again since. I’m positive partially it pertains to this concept (additionally from the article):
Associated components ought to usually be programmatically grouped so its clear what belongs to what.
Heydon suggests utilizing a <determine> and <figcaption> to invoke this grouping, which appears essentially the most wise choice.
I additionally learnt concerning the <q> ingredient for the primary time on this article:
For inline (or “text-level”) quotations, there’s
<q>as an alternative.
OK. So…is it not sufficient to place precise quote marks within the textual content (“like this”, which I’ll wager is what occurs in 99.999% of circumstances)? I imply, it has a cite attribute, however provided that in line with Heydon, “The <blockquote> cite attribute is usually ineffective because it’s invisible and most display readers additionally ignore it”, I can’t see any actual use circumstances. It it only a styling factor? Through which case, wouldn’t a <span> suffice? I’ll eagerly await Heydon’s <q> article to seek out out.
HTML is Onerous
All of which is to say, HTML is tough. Most likely the toughest a part of my job. In all of the years I’ve been writing articles, I’ve acquired way more complaints/corrections about HTML than anything, and I contemplate myself fairly OK at HTML. And regardless of writing it for years, I don’t really feel like I actually realize it effectively (see above).
Conversely, it’s fairly simple to put in writing dangerous HTML, as a result of for many builders there are no penalties. When you write some dangerous Javascript, your software will most likely crash and also you or your customers will get a horrible error message. It’s like a flashing mild above your head telling the world you’ve executed one thing dangerous. On the very least you’ll really feel like a prize chump. HTML fails silently. Write dangerous HTML and possibly it means somebody who doesn’t browse the net in precisely the identical means as you do doesn’t get entry to the data they want. However possibly you continue to get your pay rise and bonus.
So it’s irritating to see the significance of studying HTML dismissed time and time once more. Sorry to finish on a nasty observe, however that’s the place we’re at proper now.
I like to recommend studying Heydon’s article, and the others from the sequence on HTML components, which is much extra complete (and, I dare say, higher written) than this one, even supposing I’ve lifted a load of quotes from it verbatim. And by the tip of the sequence, hopefully we’ll all be consultants in HTML.
Edit
Adrian Roselli has a terrific rundown of how totally different screenreaders announce numerous mixtures of <blockquote> and <cite>. Studying although these, I don’t suppose nesting <cite> inside <blockquote> is a completely horrible selection, even when it’s technically flawed.

