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 301235 of head 要素

  • リビジョンの URL スラグ: DOM/HTMLHeadElement
  • リビジョンのタイトル: head 要素
  • リビジョンの ID: 301235
  • 作成日:
  • 作成者: ethertank
  • 現行リビジョン? いいえ
  • コメント

このリビジョンの内容

{{英語版章題("Summary")}}

概要

<head> 要素は HTML 文書のメタデータ群を内包する要素です。他の要素を用いて記述された、文書のタイトルや概要、前後のページ等へのリンク、スクリプトやスタイルシートの定義などを内包する事が可能です。

{{英語版章題("Usage context")}}

使用可能な場所

コンテンツカテゴリ 無し
許可された内容 {{HTMLElement("title")}} 要素(ひとつのみ)、{{HTMLElement("base")}} 要素(任意)、メタデータ要素に属する全ての要素(順不同、任意の個数)。HTML5 では {{HTMLElement("object")}} 要素は <head> 要素の子要素としての使用が認められなくなりました。
タグの省略 <head> 要素内の最初のノードがコメントでない場合、開始タグを省略可能です。
head 要素に続く最初のものが空白文字やコメントでない場合、終了タグが省略可能となります。
許可された親要素 {{HTMLElement("html")}} 要素
標準文書 HTML 5, section 4.2.1; HTML 4.01, section 7.4.1
{{英語版章題("Attributes")}}

属性

他の全ての要素と同様に、この要素はグローバル属性を持ちます。

{{htmlattrdef("profile")}} {{HTMLVersionInline("4")}}のみ。{{obsoleteGeneric("inline","html5")}}
1 つ以上のメタデータプロファイルの URI。値が複数の場合は半角スペースで区切ります。
{{英語版章題("DOM interface")}}

DOM インターフェース

この要素は HTMLHeadElement インターフェースを提供します。

{{英語版章題("Example")}}

<html>
  <head>
    <title>Document title</title>
  </head>
</html>
{{英語版章題("Notes")}}

注意

殆どのブラウザーは タグが省略されている場合にも <head> 要素を暗黙に生成し、補完します。但し、 例外もあります。
次のブラウザーは、head 要素のタグの省略を補完しません : Android 1.6 以下、 iPhone 3.1.3 以下 Nokia 90、 Opera 9.27 以下、 Safari 3.2.1 以下(※数値は各ブラウザーのバージョンを意味します)

{{英語版章題("Browser compatibility")}}

ブラウザ実装状況

{{CompatibilityTable()}}

機能 Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
基本サポート 1.0 {{CompatVersionUnknown()}} {{CompatVersionUnknown()}} {{CompatVersionUnknown()}} {{CompatVersionUnknown()}}
機能 Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
基本サポート {{CompatVersionUnknown()}} {{CompatVersionUnknown()}} {{CompatVersionUnknown()}} {{CompatVersionUnknown()}} {{CompatVersionUnknown()}}
{{英語版章題("See also")}}

参照

  • <head> 要素内で使用可能な要素 : {{HTMLElement("title")}}、 {{HTMLElement("base")}}、 {{HTMLElement("link")}}、 {{HTMLElement("style")}}、 {{HTMLElement("meta")}}、 {{HTMLElement("script")}}、 {{HTMLElement("noscript")}}、 {{HTMLElement("command")}}
{{HTML:Element_Navigation()}}

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

<div>{{英語版章題("Summary")}}</div>
<h2>概要</h2>
<p><code>&lt;head&gt;</code> 要素は HTML 文書のメタデータ群を内包する要素です。他の要素を用いて記述された、文書のタイトルや概要、前後のページ等へのリンク、スクリプトやスタイルシートの定義などを内包する事が可能です。</p>



<div>{{英語版章題("Usage context")}}</div>
<h2>使用可能な場所</h2>
<table class="standard-table">
  <tbody>
    <tr>
      <th><a href="/ja/docs/HTML/Content_categories" title="ja/docs/HTML/Content categories">コンテンツカテゴリ</a></th>
      <td>無し</td>
    </tr>
    <tr>
      <th>許可された内容</th>
      <td>{{HTMLElement("title")}} 要素(ひとつのみ)、{{HTMLElement("base")}} 要素(任意)、<a href="/ja/docs/HTML/Content_categories#Metadata_content" title="ja/docs/HTML/Content categories#Metadata content">メタデータ要素</a>に属する全ての要素(順不同、任意の個数)。HTML5 では {{HTMLElement("object")}} 要素は <code>&lt;head&gt;</code> 要素の子要素としての使用が認められなくなりました。</td>
    </tr>
    <tr>
      <th>タグの省略</th>
      <td><code>&lt;head&gt;</code> 要素内の最初のノードがコメントでない場合、開始タグを省略可能です。<br />
        <code>head</code> 要素に続く最初のものが空白文字やコメントでない場合、終了タグが省略可能となります。</td>
    </tr>
    <tr>
      <th>許可された親要素</th>
      <td>{{HTMLElement("html")}} 要素</td>
    </tr>
    <tr>
      <th>標準文書</th>
      <td><a class="external" href="https://www.w3.org/TR/html5/semantics.html#the-head-element-0" title="https://www.w3.org/TR/html5/semantics.html#the-head-element-0">HTML 5, section 4.2.1</a>;  <a class="external" href="https://www.w3.org/TR/html401/struct/global.html#h-7.4.1" title="https://www.w3.org/TR/html401/struct/global.html#h-7.4.1">HTML 4.01, section 7.4.1</a></td>
    </tr>
  </tbody>
</table>








<div>{{英語版章題("Attributes")}}</div>
<h2>属性</h2>
<p>他の全ての要素と同様に、この要素は<a href="/ja/docs/HTML/Global_attributes" title="ja/docs/HTML/Global attributes">グローバル属性</a>を持ちます。</p>
<dl>
  <dt>
    {{htmlattrdef("profile")}} {{HTMLVersionInline("4")}}のみ。{{obsoleteGeneric("inline","html5")}}</dt>
  <dd>
    1 つ以上のメタデータプロファイルの URI。値が複数の場合は半角スペースで区切ります。</dd>
</dl>









<div>{{英語版章題("DOM interface")}}</div>
<h2>DOM インターフェース</h2>
<p>この要素は <a href="/ja/docs/DOM/HTMLHeadElement" title="ja/docs/DOM/HTMLHeadElement">HTMLHeadElement</a> インターフェースを提供します。</p>








<div>{{英語版章題("Example")}}</div>
<h2>例</h2>
<pre class="brush: html">
&lt;html&gt;
  &lt;head&gt;
    &lt;title&gt;Document title&lt;/title&gt;
  &lt;/head&gt;
&lt;/html&gt;
</pre>







<div>{{英語版章題("Notes")}}</div>
<h2>注意</h2>
<p>殆どのブラウザーは タグが省略されている場合にも <code>&lt;head&gt;</code> 要素を暗黙に生成し、補完します。但し、 <a class="external" href="https://www.stevesouders.com/blog/2010/05/12/autohead-my-first-browserscope-user-test/" title="https://www.stevesouders.com/blog/2010/05/12/autohead-my-first-browserscope-user-test/">例外もあります。</a><br />
  次のブラウザーは、<code>head</code> 要素のタグの省略を補完しません : Android 1.6 以下、 iPhone 3.1.3 以下 Nokia 90、 Opera 9.27 以下、 Safari 3.2.1 以下(※数値は各ブラウザーのバージョンを意味します)</p>







<div>{{英語版章題("Browser compatibility")}}</div>
<h2>ブラウザ実装状況</h2>
<p>{{CompatibilityTable()}}</p>
<div id="compat-desktop">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>機能</th>
        <th>Chrome</th>
        <th>Firefox (Gecko)</th>
        <th>Internet Explorer</th>
        <th>Opera</th>
        <th>Safari (WebKit)</th>
      </tr>
      <tr>
        <td>基本サポート</td>
        <td>1.0</td>
        <td>{{CompatVersionUnknown()}}</td>
        <td>{{CompatVersionUnknown()}}</td>
        <td>{{CompatVersionUnknown()}}</td>
        <td>{{CompatVersionUnknown()}}</td>
      </tr>
    </tbody>
  </table>
</div>
<div id="compat-mobile">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>機能</th>
        <th>Android</th>
        <th>Firefox Mobile (Gecko)</th>
        <th>IE Phone</th>
        <th>Opera Mobile</th>
        <th>Safari Mobile</th>
      </tr>
      <tr>
        <td>基本サポート</td>
        <td>{{CompatVersionUnknown()}}</td>
        <td>{{CompatVersionUnknown()}}</td>
        <td>{{CompatVersionUnknown()}}</td>
        <td>{{CompatVersionUnknown()}}</td>
        <td>{{CompatVersionUnknown()}}</td>
      </tr>
    </tbody>
  </table>
</div>








<div>{{英語版章題("See also")}}</div>
<h2>参照</h2>
<ul>
  <li><code>&lt;head&gt;</code> 要素内で使用可能な要素 : {{HTMLElement("title")}}、 {{HTMLElement("base")}}、 {{HTMLElement("link")}}、 {{HTMLElement("style")}}、 {{HTMLElement("meta")}}、 {{HTMLElement("script")}}、 {{HTMLElement("noscript")}}、 {{HTMLElement("command")}}</li>
</ul>



<div>{{HTML:Element_Navigation()}}</div>
このリビジョンへ戻す