BLOCKQUOTEとQ要素
BLOCKQUOTE要素とQ要素は引用を示します。
- BLOCKQUOTE要素は複数行にまたがるような長い引用の場合に使用します。
- ブロック要素です。
- 要素内の文字列は、一般にインデントされて表示されます。
- Q要素は短い引用を行なう場合に使います。
- こちらはインライン要素です。
- 要素内の文字列は、""付きでレンダリングされます。
- どちらの要素もcite属性で引用元文書のURLを明示することができます。
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> </head> <body> <p> BLOCKQUOTE要素は引用を示します。説明は以下。(HTML 4.01 Specificationより。) <blockquote cite="http://www.w3.org/TR/html401/struct/text.html#edef-BLOCKQUOTE"> These two elements designate quoted text. BLOCKQUOTE is for long quotations (block-level content) and Q is intended for short quotations (inline content) that don't require paragraph breaks. </blockquote> また、短い引用文には、Q要素も使えます。 <q cite="http://www.w3.org/TR/html401/struct/text.html#edef-BLOCKQUOTE">Q element is rendered with delimiting quotation marks.</q> とあるように、Q要素で区切られた文字列は""付きでレンダリングされます。 </p> </body> </html>
ここで表示結果を確認できます。
Q要素とcite属性はしらなんだな。