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

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

このリビジョンの内容

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

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

{{ 英語版章題("Usage context") }}使用可能な場所

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

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 1.0 {{ CompatVersionUnknown() }} {{ CompatVersionUnknown() }} {{ CompatVersionUnknown() }} {{ CompatVersionUnknown() }}
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support {{ 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() }}
{{ languages({ "en": "en/HTML/Element/head", "de": "de/HTML/Element/head", "ja": "ja/HTML/Element/head" }) }}

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

<h2 id=".7B.7B_.E8.8B.B1.E8.AA.9E.E7.89.88.E7.AB.A0.E9.A1.8C(.22Summary.22)_.7D.7D.E6.A6.82.E8.A6.81">{{ 英語版章題("Summary") }}概要</h2>
<p><code>&lt;head&gt;</code> 要素は HTML 文書のメタデータ群を内包する要素です。他の要素を用いて記述された、文書のタイトルや概要、前後のページ等へのリンク、スクリプトやスタイルシートの定義などを内包する事が可能です。</p>
<h2 id=".7B.7B_.E8.8B.B1.E8.AA.9E.E7.89.88.E7.AB.A0.E9.A1.8C(.22Usage_context.22)_.7D.7D.E4.BD.BF.E7.94.A8.E5.8F.AF.E8.83.BD.E3.81.AA.E5.A0.B4.E6.89.80">{{ 英語版章題("Usage context") }}使用可能な場所</h2>
<table class="standard-table">
  <tbody>
    <tr>
      <th><a href="/ja/HTML/Content_categories" title="ja/HTML/Content categories">コンテンツ・カテゴリー</a></th>
      <td>無し</td>
    </tr>
    <tr>
      <th>許可された内容</th>
      <td>{{ HTMLElement("title") }} 要素(ひとつのみ)、{{ HTMLElement("base") }} 要素(任意)、<a href="/ja/HTML/Content_categories#Metadata_content" title="ja/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>;&nbsp; <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>
<h2 id=".7B.7B_.E8.8B.B1.E8.AA.9E.E7.89.88.E7.AB.A0.E9.A1.8C(.22Attributes.22)_.7D.7D.E5.B1.9E.E6.80.A7">{{ 英語版章題("Attributes") }}属性</h2>
<p>他の全ての要素と同様に、この要素は<a href="/ja/HTML/Global_attributes" title="ja/HTML/Global attributes">グローバル属性</a>を持ちます。</p>
<dl>
  <dt>
    {{ htmlattrdef("profile") }} {{ HTMLVersionInline("4") }}のみ。{{ obsoleteGeneric("inline","html5") }}</dt>
  <dd>
    1 つ以上のメタデータプロファイルの URI。値が複数の場合は半角スペースで区切ります。</dd>
</dl>
<h2 id=".7B.7B_.E8.8B.B1.E8.AA.9E.E7.89.88.E7.AB.A0.E9.A1.8C(.22DOM_interface.22)_.7D.7DDOM_.E3.82.A4.E3.83.B3.E3.82.BF.E3.83.BC.E3.83.95.E3.82.A7.E3.83.BC.E3.82.B9">{{ 英語版章題("DOM interface") }}DOM インターフェース</h2>
<p>この要素は <a href="/ja/DOM/HTMLHeadElement" title="ja/DOM/HTMLHeadElement">HTMLHeadElement</a> インターフェースを提供します。</p>
<h2 id=".7B.7B_.E8.8B.B1.E8.AA.9E.E7.89.88.E7.AB.A0.E9.A1.8C(.22Example.22)_.7D.7D.E4.BE.8B">{{ 英語版章題("Example") }}例</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>
<h2 id=".7B.7B_.E8.8B.B1.E8.AA.9E.E7.89.88.E7.AB.A0.E9.A1.8C(.22Notes.22)_.7D.7D.E6.B3.A8.E6.84.8F">{{ 英語版章題("Notes") }}注意</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>
<h2 id=".7B.7B_.E8.8B.B1.E8.AA.9E.E7.89.88.E7.AB.A0.E9.A1.8C(.22Browser_compatibility.22)_.7D.7D.E3.83.96.E3.83.A9.E3.82.A6.E3.82.B6.E6.AF.8E.E3.81.AE.E4.BA.92.E6.8F.9B.E6.80.A7">{{ 英語版章題("Browser compatibility") }}ブラウザ毎の互換性</h2>
<p>{{ CompatibilityTable() }}</p>
<div id="compat-desktop">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Chrome</th>
        <th>Firefox (Gecko)</th>
        <th>Internet Explorer</th>
        <th>Opera</th>
        <th>Safari (WebKit)</th>
      </tr>
      <tr>
        <td>Basic support</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>Feature</th>
        <th>Android</th>
        <th>Firefox Mobile (Gecko)</th>
        <th>IE&nbsp;Phone</th>
        <th>Opera Mobile</th>
        <th>Safari Mobile</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>{{ CompatVersionUnknown() }}</td>
        <td>{{ CompatVersionUnknown() }}</td>
        <td>{{ CompatVersionUnknown() }}</td>
        <td>{{ CompatVersionUnknown() }}</td>
        <td>{{ CompatVersionUnknown() }}</td>
      </tr>
    </tbody>
  </table>
</div>
<h2 id=".7B.7B_.E8.8B.B1.E8.AA.9E.E7.89.88.E7.AB.A0.E9.A1.8C(.22See_also.22)_.7D.7D.E5.8F.82.E7.85.A7">{{ 英語版章題("See also") }}参照</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>
<div>
  {{ languages({ "en": "en/HTML/Element/head", "de": "de/HTML/Element/head", "ja": "ja/HTML/Element/head" }) }}</div>
このリビジョンへ戻す