<hr>
対応ブラウザ | Internet Explorer 2~ Firefox 1~ Google Chrome 1~ Safari 1~ Opera 6~ | ||
---|---|---|---|
タグの分類 | ブロックレベル要素、空要素 | 定義バージョン | Strict, Transitional, Frameset |
開始タグ | 必須 | 終了タグ | なし |
用例 |
|
属性
size | 概要 | 水平線の太さをピクセル単位で指定します。 |
---|---|---|
属性の値 | 数値 | |
width | 概要 | 水平線の長さをピクセル単位、またはパーセンテージで指定します。 |
属性の値 | 数値、% | |
align | 概要 | 水平方向の表示位置を指定します。中央寄せ、左寄せ、右寄せの指定が可能です。 |
属性の値 | left、center、right | |
noshade | 概要 | 立体的な影を付けない線で表示します。 |
属性の値 | (noshade) |
<hr>とは
「HR」とは「horizontal rule(水平方向の罫線)」の略で、水平の横線を引くためのタグです。
水平線はwidth属性を使用して横の長さを変えたり、size属性により太さを指定したりすることができます。
また、通常は影が付いている立体的な罫線ですが、noshade属性を指定することにより立体感がない罫線にすることができます。
サンプルデモ
width="値":
<hr width="400">

size="値":
<hr size="10">

align="left":
<hr width="400" size="10" align="left">

align="center":
<hr width="400" size="10" align="center">

align="right":
<hr width="400" size="10" align="right">

noshade="":
<hr width="400" size="10" noshade="">
