{{ 英語版章題("Summary") }}概要
p 要素 (<p>)は、パラグラフ(段落)を表します。HTML において、もっとも使用頻度の高いブロックレベル要素です。
{{ 英語版章題("Usage context") }}使用可能な場所
許可された内容 | フレージング・コンテンツ. |
---|---|
タグの省略 | 後続の要素がブロックレベルであれば、終了タグ を省略することが可能です。 |
許可された親要素 | フロー・コンテンツを受け入れる全ての要素 |
標準文書 | HTML 5, section 4.5.1; HTML 4.01, section 9.3.1 |
{{ 英語版章題("Attributes") }}属性
他の全ての HTML 要素と同様に、この要素は グローバル属性 を持ちます。
{{ HTMLVersionInline("5") }} に於いては <p>
の align 属性は {{ obsolete_inline() }} となっています。
(訳注: CSS、とりわけ text-align プロパティの使用による調整が最も適切でしょう)
{{ 英語版章題("DOM interface") }}DOM インターフェース
この要素は HTMLParagraphElement
インターフェースを提供します。
{{ 英語版章題("Example") }}例
<p>This is the first paragraph of text. This is the first paragraph of text. This is the first paragraph of text. This is the first paragraph of text.</p> <p>This is second paragraph of text. This is second paragraph of text. This is second paragraph of text. This is second paragraph of text.</p>
表示結果は以下の様になります。
This is the first paragraph of text. This is the first paragraph of text. This is the first paragraph of text. This is the first paragraph of text.
This is second paragraph of text. This is second paragraph of text. This is second paragraph of text. This is second paragraph of text.
{{ 英語版章題("Notes") }}注意
p 要素同士の間隔を調整するには CSS の margin プロパティを使用して下さい。
空の p 要素(<p></p>)や br 要素(<br>
)を 二つの p 要素の間に使用してこれを実現してはなりません。これは誤りです。
{{ 英語版章題("See also") }}参照
- {{ Htmlxref("hr") }} 要素
- {{ Htmlxref("br") }} 要素
{{ HTML:Element_Navigation() }}
{{ languages({ "en": "en/HTML/Element/p", "ja": "ja/HTML/Element/p", "de": "de/HTML/Element/p", "pl": "pl/HTML/Element/p" }) }}