aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/html/element/span
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/ja/web/html/element/span
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/ja/web/html/element/span')
-rw-r--r--files/ja/web/html/element/span/index.html129
1 files changed, 129 insertions, 0 deletions
diff --git a/files/ja/web/html/element/span/index.html b/files/ja/web/html/element/span/index.html
new file mode 100644
index 0000000000..4d6b3b01cc
--- /dev/null
+++ b/files/ja/web/html/element/span/index.html
@@ -0,0 +1,129 @@
+---
+title: <span>
+slug: Web/HTML/Element/span
+tags:
+ - Element
+ - HTML
+ - HTML text-level semantics
+ - 'HTML:Flow content'
+ - Reference
+ - Web
+translation_of: Web/HTML/Element/span
+---
+<div>{{HTMLRef}}</div>
+
+<p><span class="seoSummary"><strong>HTML の <code>&lt;span&gt;</code> 要素</strong>は、記述コンテンツの汎用的な行内コンテナーであり、何かを表すものではありません。スタイル付けのため ({{htmlattrxref("class")}} または {{htmlattrxref("id")}} 属性を使用して)、または {{htmlattrxref("lang")}} のような属性値を共有したりするために要素をグループ化する用途で使用することができます。</span>他に適切な意味的要素がない時にのみ使用してください。 <code>&lt;span&gt;</code> は {{HTMLElement("div")}} 要素ととても似ていますが、 {{HTMLElement("div")}} が<a href="/ja/docs/Web/HTML/Block-level_elements">ブロックレベル要素</a>であるのに対し、 <code>&lt;span&gt;</code> は<a href="/ja/docs/Web/HTML/Inline_elements">インライン要素</a>です。</p>
+
+<div>{{EmbedInteractiveExample("pages/tabbed/span.html", "tabbed-shorter")}}</div>
+
+<div class="hidden">このデモのソースファイルは GitHub リポジトリに格納されています。デモプロジェクトに協力したい場合は、 <a href="https://github.com/mdn/interactive-examples">https://github.com/mdn/interactive-examples</a> をクローンしてプルリクエストを送信してください。</div>
+
+<table class="properties">
+ <tbody>
+ <tr>
+ <th scope="row"><a href="/ja/docs/Web/HTML/Content_categories">コンテンツカテゴリ</a></th>
+ <td><a href="/ja/docs/Web/HTML/Content_categories#Flow_content">フローコンテンツ</a>, <a href="/ja/docs/Web/HTML/Content_categories#Phrasing_content">記述コンテンツ</a></td>
+ </tr>
+ <tr>
+ <th scope="row">許可されている内容</th>
+ <td><a href="/ja/docs/Web/HTML/Content_categories#Phrasing_content">記述コンテンツ</a></td>
+ </tr>
+ <tr>
+ <th scope="row">タグの省略</th>
+ <td>{{no_tag_omission}}</td>
+ </tr>
+ <tr>
+ <th scope="row">許可されている親要素</th>
+ <td><a href="/ja/docs/Web/HTML/Content_categories#Phrasing_content">記述コンテンツ</a>を受け入れるすべての要素、または<a href="/ja/docs/Web/HTML/Content_categories#Flow_content">フローコンテンツ</a>を受け入れるすべての要素。</td>
+ </tr>
+ <tr>
+ <th scope="row">暗黙の ARIA ロール</th>
+ <td><a href="https://www.w3.org/TR/html-aria/#dfn-no-corresponding-role">対応するロールなし</a></td>
+ </tr>
+ <tr>
+ <th scope="row">許可されている ARIA ロール</th>
+ <td>すべて</td>
+ </tr>
+ <tr>
+ <th scope="row">DOM インターフェイス</th>
+ <td>{{domxref("HTMLSpanElement")}} ({{glossary("HTML5")}} より前は {{domxref("HTMLElement")}})</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Attributes" name="Attributes">属性</h2>
+
+<p>この要素には<a href="/ja/docs/Web/HTML/Global_attributes">グローバル属性</a>のみがあります。</p>
+
+<h2 id="Example" name="Example">例</h2>
+
+<h3 id="Example_1" name="Example_1">例 1</h3>
+
+<h4 id="HTML">HTML</h4>
+
+<pre class="brush:html gutter:false notranslate">&lt;p&gt;&lt;span&gt;Some text&lt;/span&gt;&lt;/p&gt;</pre>
+
+<h4 id="Result" name="Result">結果</h4>
+
+<p>{{EmbedLiveSample('Example_1')}}</p>
+
+<h3 id="Example_2" name="Example_2">例 2</h3>
+
+<h4 id="HTML_2">HTML</h4>
+
+<pre class="brush:html gutter:false notranslate">&lt;li&gt;&lt;span&gt;
+ &lt;a href="portfolio.html" target="_blank"&gt;See my portfolio&lt;/a&gt;
+&lt;/span&gt;&lt;/li&gt;
+</pre>
+
+<h4 id="CSS">CSS</h4>
+
+<pre class="brush: css notranslate">li span {
+ background: gold;
+ }
+</pre>
+
+<h4 id="Result_2" name="Result_2">結果</h4>
+
+<p>{{EmbedLiveSample('Example_2')}}</p>
+
+<h2 id="Specifications" name="Specifications">仕様書</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">仕様書</th>
+ <th scope="col">状態</th>
+ <th scope="col">備考</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName('HTML WHATWG', 'text-level-semantics.html#the-span-element', '&lt;span&gt;')}}</td>
+ <td>{{Spec2('HTML WHATWG')}}</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>{{SpecName('HTML5 W3C', 'textlevel-semantics.html#the-span-element', '&lt;span&gt;')}}</td>
+ <td>{{Spec2('HTML5 W3C')}}</td>
+ <td>{{glossary("DOM")}} インターフェイスを {{domxref("HTMLSpanElement")}} に変更</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('HTML4.01', 'struct/global.html#edef-SPAN', '&lt;span&gt;')}}</td>
+ <td>{{Spec2('HTML4.01')}}</td>
+ <td></td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザーの互換性</h2>
+
+<div class="hidden">このページの互換性一覧表は構造化データから生成されています。データに協力していただけるのであれば、 <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> をチェックアウトしてプルリクエストを送信してください。</div>
+
+<p>{{Compat("html.elements.span")}}</p>
+
+<h2 id="See_also" name="See_also">関連情報</h2>
+
+<ul>
+ <li>HTML の {{HTMLElement("div")}} 要素</li>
+</ul>