Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 6 additions & 12 deletions files/ja/web/html/reference/elements/span/index.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,27 @@
---
title: "<span>: コンテンツ区間要素"
slug: Web/HTML/Reference/Elements/span
original_slug: Web/HTML/Element/span
l10n:
sourceCommit: a46d4d15ea85b4bbb83df145228bc40f658868be
sourceCommit: f2d281d86396bcd2dcecfdabd5837b1590132aa6
---

{{HTMLSidebar}}

**`<span>`** は [HTML](/ja/docs/Web/HTML) の要素で、記述コンテンツの汎用的なインラインコンテナーであり、何かを表すものではありません。スタイル付けのため([`class`](/ja/docs/Web/HTML/Reference/Global_attributes/class) または [`id`](/ja/docs/Web/HTML/Reference/Global_attributes/id) 属性を使用して)、または [`lang`](/ja/docs/Web/HTML/Reference/Global_attributes/lang) のような属性値を共有したりするために要素をグループ化する用途で使用することができます。他に適切な意味的要素がない時にのみ使用してください。 `<span>` は {{HTMLElement("div")}} 要素ととても似ていますが、 {{HTMLElement("div")}} が[ブロックレベルの要素](/ja/docs/Glossary/Block-level_content)であるのに対し、 `<span>` は[インラインレベルの要素](/ja/docs/Glossary/Inline-level_content)です。

{{InteractiveExample("HTML デモ: &lt;span&gt;", "tabbed-shorter")}}

```html interactive-example
```html-nolint interactive-example
<p>
Add the <span class="ingredient">basil</span>,
<span class="ingredient">pine nuts</span> and
<span class="ingredient">garlic</span> to a blender and blend into a paste.
ミキサーに<span class="ingredient">バジル</span>、<span class="ingredient">松の実</span>、<span class="ingredient">ニンニク</span>を追加し、ペースト状になるまで混ぜ合わせます。
</p>

<p>
Gradually add the <span class="ingredient">olive oil</span> while running the
blender slowly.
ブレンダーを低速で回しながら、<span class="ingredient">オリーブオイル</span>を少しずつ加えてください。
</p>
```

```css interactive-example
span.ingredient {
color: #f00;
color: red;
}
```

Expand Down Expand Up @@ -116,7 +110,7 @@ li span {
<tr>
<th scope="row">暗黙の ARIA ロール</th>
<td>
<a href="https://www.w3.org/TR/html-aria/#dfn-no-corresponding-role"
<a href="https://w3c.github.io/html-aria/#dfn-no-corresponding-role"
>対応するロールなし</a
>
</td>
Expand Down