<q>文字列</q>
<q cite="引用元のURL">文字列</q>
<q cite="引用元のURL">文字列</q>
要素名 | 属性名 | 説明 | 非推奨 | 必須属性 |
---|---|---|---|---|
q | インライン要素の引用文 | |||
cite | 引用元URL | |||
class | クラス名 | |||
id | ID名 | |||
title | 補足情報 | |||
style | スタイルシート | |||
lang | 言語コード | |||
dir | 文字表記の方向 |
q要素は、「quotation」の略で、その部分が短い引用文であることを示します。段落の一部などインライン要素として
引用する場合に使用します。cite属性を使用すると、引用元のURLを示す事も出来ます。指定した範囲の前後に自動的に引用符(IE8では、かぎ括弧が付きます)が
付けられますので、文章の中に引用符を入れないようにして下さい。
また、文章の段落などブロックレベル要素として引用する場合は、blockquote要素を使用します。
Sample
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="ja">
<head>
<base href="http://www.abcd.com/efg/index.html">
<meta http-equiv="Content-Type" content="text/html; charset=shift_jis">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<meta name="author" content="制作者名">
<meta name="description" content="内容の紹介">
<meta name="keywords" content="キーワード1,キーワード2,キーワード3,・・・">
<link rel="start" href="start.html">
<link rel="index" href="index.html">
<title>短い引用文を表す。</title>
</head>
<body text="black" bgcolor="#FFF8DC">
<p>HTML4.01仕様書には、<q cite="http://www.asahi-net.or.jp/~sd5a-ucd/rec-html401j/struct/text.html#h-9.2.2"> Q要素は、段落の区切りを必要としないような短い引用 (インライン内容) を示す。</q>と有ります。
</p>
</body>
</html>
<html lang="ja">
<head>
<base href="http://www.abcd.com/efg/index.html">
<meta http-equiv="Content-Type" content="text/html; charset=shift_jis">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<meta name="author" content="制作者名">
<meta name="description" content="内容の紹介">
<meta name="keywords" content="キーワード1,キーワード2,キーワード3,・・・">
<link rel="start" href="start.html">
<link rel="index" href="index.html">
<title>短い引用文を表す。</title>
</head>
<body text="black" bgcolor="#FFF8DC">
<p>HTML4.01仕様書には、<q cite="http://www.asahi-net.or.jp/~sd5a-ucd/rec-html401j/struct/text.html#h-9.2.2"> Q要素は、段落の区切りを必要としないような短い引用 (インライン内容) を示す。</q>と有ります。
</p>
</body>
</html>
Internet Explorer8での表示例
