Summary
Identifying quoted text and their sources allows assistive technology users to distinguish prose that is cited from another source.
Techniques
- Identify quotes separated from the primary narrative using the
blockquote
element. [[WCAG-1.3.1]] - Identify quotes inline with the primary narrative using the
q
element. [[WCAG-1.3.1]] - Identify the source of quotes using the
cite
element. [[WCAG-1.3.1]]
Examples
Frequently Asked Questions
- Can I put the citation in the
blockquote
tag? -
The HTML specification makes this illegal:
Attribution for the quotation, if any, must be placed outside the
blockquote
element.The citation is separate from the quote itself. You can use a
figure
tag to associate ablockquote
, as in example 3 with its citation but this is not strictly necessary. - Do I have to use a
figure
tag when there is a citation? -
No. The choice whether to use the extra
figure
tag markup is at author discretion. It may be useful to group quotes and citations for internal workflow purposes, for example. The choice to use afigure
does not significantly change the experience for assistive technology users. - Why do some sites say
blockquote
can have afooter
for the citation? -
Technically, it is valid for a
blockquote
to contain afooter
, but the meaning of afooter
element in ablockquote
is unclear. According to the HTML specification, afooter
applies to its nearest sectioning orbody
element, so afooter
in ablockquote
does not describe that element.More specifically to this question, though, there were two different maintainers of HTML for a while. One group made the practice of using a
footer
for the citation legal while the other did not. The version of HTML that made it legal is now defunct. - Can I cite a speaker or author name?
-
The HTML specification also says this illegal:
The cite element represents the title of a work … A person's name is not the title of a work … and the element must therefore not be used to mark up people's names.
- Does the
cite
attribute do anything? -
Not for end users at this time, no. Reading systems will not make the URL in the attribute available to follow.
If you need the attribute other reasons (e.g., internal referencing of where a quote came from), or have a script to process the value, you can include it on both the
blockquote
andq
tags.
Explanation
HTML includes two tags for identifying quotes:
blockquote
-
The
blockquote
element is for quotes that are offset from the main text. When rendered visually, the quote is distinguished by a larger indented on the left than the surrounding paragraphs. Quote characters are not added to the content inside the element. q
-
The
q
element is for identifying quotes that are incorporated within another paragraph of text. When rendered visually, quote characters are automatically added, where the characters used change based on the language of the text and whether the quote is nested in another quote.
When blockquote
and q
tags are used to identify text quoted from another
source, users of assistive technologies have access to this important information. When the correct
semantic elements are not used, users may not always be aware that a quote is being read. Works of
fiction, for example, sometimes intersperse fictional quotes without clearly indicating in the text
that what follows is a quote.
Quote tags, specifically the inline q
tags, are not used to tag regular character
dialog in works of fiction. They are intended for quoting text from other sources, both real
and fictional.
The primary point of confusion with quoting other sources is not in tagging the quoted text, but in how to represent the citation. Some authors want to include the citation within the blockquote, but according to the HTML specification this is invalid. Some authors also want to cite the author of a quote instead of the work it comes from, especially if there is no specific source (e.g., the phrase is a saying generally attributed to the person). This is also stated to be invalid by the HTML specification.
The problem with the HTML specification rules is that they are unenforceable by validators. Unless you manually spot a violation, a publication that does not follow these practices will not be flagged. Whether these violations have any impact on users of assistive technologies is also debatable, and for a while the W3C HTML5 specification (now defunct) allowed more flexibility in their application.
Regardless, it is always best to follow accepted markup practices. Although the rules have little impact today, the separation of quotes from citations, and works from authors, could have benefits in the future.
Related Links
- HTML — The
blockquote
element - HTML — The
q
element