aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/html/global_attributes/slot/index.md
blob: 831a0a831967a5dbdf70d5ecfbb244c0c4a9bcc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
---
title: slot
slug: Web/HTML/Global_attributes/slot
tags:
  - グローバル属性
  - HTML
  - リファレンス
browser-compat: html.global_attributes.slot
translation_of: Web/HTML/Global_attributes/slot
---

{{HTMLSidebar("Global_attributes")}}

**`slot`** は[グローバル属性](/ja/docs/Web/HTML/Global_attributes)で、[シャドウ DOM](/ja/docs/Web/Web_Components/Using_shadow_DOM) のシャドウツリー内にあるスロットを、ある要素に割り当てます。 `slot` 属性をもつ要素には、 {{HTMLElement("slot")}} 要素に {{htmlattrxref("name", "slot")}} 属性の値を指定することで生成されたスロット
の値がその `slot` 属性の値と一致する生成されたスロットに割り当てられます。

例については、[テンプレートとスロットの使用](/ja/docs/Web/Web_Components/Using_templates_and_slots)ガイドを参照してください。

## 仕様書

{{Specifications}}

## ブラウザーの互換性

{{Compat}}

## 関連情報

- すべての[グローバル属性](/ja/docs/Web/HTML/Global_attributes)