Syntax | <Q>...</Q> |
---|---|
Attribute Specifications |
|
Contents | Inline elements |
Contained in | Inline elements, block-level elements |
The Q element is used for short, inline quotations. For longer (block) quotations, use the BLOCKQUOTE element.
The Q element's optional CITE attribute provides a URI of the source of the quotation. Some examples follow:
<P>In the words of Albert Einstein, <Q>God does <EM>not</EM> play dice.</Q></P>
<P>According to Dave Raggett, <Q CITE="http://www.w3.org/Press/HTML4-REC">HTML 4.0 gives Web designers the ability to create dynamic visually exciting pages that are accessible to all.</Q></P>
Note that authors should not include their own quotation marks when using the Q element. However, this can be a problem since old browsers such as Internet Explorer 6.0 fail to insert quotation marks for Q as required. Authors may prefer to avoid Q and insert their own quotation marks. Another alternative is to use I in combination with Q so that the quotation is distinguished from other text in most browsers. The previous example could also be given as follows:
<P>According to Dave Raggett, <I><Q CITE="http://www.w3.org/Press/HTML4-REC">HTML 4.0 gives Web designers the ability to create dynamic visually exciting pages that are accessible to all.</Q></I></P>
The quotation marks used by browsers for Q should take into account the nesting of quotations and the language (based on the LANG attribute of Q or the language of its parent). However, many browsers use double quotes regardless of the nesting or language.