Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 233358 of p 要素

  • リビジョンの URL スラグ: HTML/Element/p
  • リビジョンのタイトル: p 要素
  • リビジョンの ID: 233358
  • 作成日:
  • 作成者: ethertank
  • 現行リビジョン? いいえ
  • コメント Reverted to earlier version; 4 words added, 12 words removed

このリビジョンの内容

{{ 英語版章題("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 要素同士の間隔を調整するには CSSmargin プロパティを使用して下さい。
空の p 要素(<p></p>)や br 要素<br>)を 二つの p 要素の間に使用してこれを実現してはなりません。これは誤りです。

{{ 英語版章題("See also") }}参照

{{ HTML:Element_Navigation() }}
{{ languages({ "en": "en/HTML/Element/p", "ja": "ja/HTML/Element/p", "de": "de/HTML/Element/p", "pl": "pl/HTML/Element/p" }) }}

このリビジョンのソースコード

<h2>{{ 英語版章題("Summary") }}概要</h2>
<p><strong>p 要素</strong> (&lt;p&gt;)は、パラグラフ(段落)を表します。HTML において、もっとも使用頻度の高いブロックレベル要素です。</p>
<h2>{{ 英語版章題("Usage context") }}使用可能な場所</h2>
<table class="standard-table"> <tbody> <tr> <th>許可された内容</th> <td><a href="/ja/HTML/Content_categories#Phrasing_content" title="ja/HTML/Content categories#Phrasing content">フレージング・コンテンツ</a>.</td> </tr> <tr> <th>タグの省略</th> <td>後続の要素がブロックレベルであれば、<span title="syntax-end-tag">終了タグ</span> を省略することが可能です。</td> </tr> <tr> <th>許可された親要素</th> <td><a href="/ja/HTML/Content_categories#Flow_content" title="ja/HTML/Content categories#Flow content">フロー・コンテンツ</a>を受け入れる全ての要素</td> </tr> <tr> <th>標準文書</th> <td><a class="external" href="https://www.w3.org/TR/html5/grouping-content.html#the-p-element" title="https://www.w3.org/TR/html5/grouping-content.html#the-p-element">HTML 5, section 4.5.1</a>; <a class="external" href="https://www.w3.org/TR/html401/struct/text.html#edef-P" title="https://www.w3.org/TR/html401/struct/text.html#edef-P">HTML 4.01, section 9.3.1</a></td> </tr> </tbody>
</table><h2>{{ 英語版章題("Attributes") }}属性</h2>
<p>他の全ての HTML 要素と同様に、この要素は <a href="/ja/HTML/Global_attributes" rel="internal" title="/ja/HTML/Global_attributes">グローバル属性</a> を持ちます。</p> <p>{{ HTMLVersionInline("5") }} に於いては <code>&lt;p&gt;</code> の <strong>align</strong> 属性は {{ obsolete_inline() }} となっています。<br> <small>(訳注: CSS、とりわけ text-align プロパティの使用による調整が最も適切でしょう)</small></p>
<h2>{{ 英語版章題("DOM interface") }}DOM インターフェース</h2>
<p>この要素は <code><a href="/ja/DOM/HTMLParagraphElement" title="ja/DOM/HTMLParagraphElement">HTMLParagraphElement</a></code> インターフェースを提供します。</p><h2>{{ 英語版章題("Example") }}例</h2>
<pre class="brush: html">&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;This is second paragraph of text. This is second paragraph of text.
   This is second paragraph of text. This is second paragraph of text.&lt;/p&gt;
</pre>
<p>表示結果は以下の様になります。</p>
<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>
<h2>{{ 英語版章題("Notes") }}注意</h2>
<p>p 要素同士の間隔を調整するには <a href="/ja/CSS" title="ja/CSS">CSS</a> の <a href="/ja/CSS/margin" title="ja/CSS/margin">margin</a> プロパティを使用して下さい。<br> 空の p 要素(&lt;p&gt;&lt;/p&gt;)や <a href="/ja/HTML/Element/br" title="ja/HTML/Element/br">br 要素</a>(<a href="/ja/HTML/Element/br" title="ja/HTML/Element/br"><code>&lt;br&gt;</code></a>)を 二つの p 要素の間に使用してこれを実現してはなりません。これは誤りです。</p>
<h2>{{ 英語版章題("See also") }}参照</h2>
<ul> <li><a href="/ja/HTML/Element/hr" title="ja/HTML/Element/hr">hr 要素</a></li> <li><a href="/en/HTML/Element/br" title="en/HTML/Element/br">HTML Line break element</a></li>
</ul>
<div>{{ HTML:Element_Navigation() }}</div>
<div>{{ languages({ "en": "en/HTML/Element/p", "ja": "ja/HTML/Element/p", "de": "de/HTML/Element/p", "pl": "pl/HTML/Element/p" }) }}</div>
このリビジョンへ戻す