: The SLOT Element
Last updated: 2026-09-12
<slot>The SLOT Element
Defines a 'slot' in a shadow DOM for Web Components—a placeholder where host content is projected; name enables named distribution.
| Category | Scripts & Embedding |
|---|---|
| Content Model | Flow content |
| Allowed Parents | Any element that accepts flow content |
| Content Tag | Yes — requires closing </slot> tag |
| Status | Standard |
📝 Syntax
<slot name="title"></slot>
⚙️ Attributes
This element supports the global attributes plus the following:
| Attribute | Value | Description |
|---|---|---|
name | Slot name; host content with slot="name" fills it; omitted is the default slot. |
▶ Example
Edit the code below and see the live result in the playground:
🌐 Browser Support
| Browser | |||||
|---|---|---|---|---|---|
| <slot> | ✓ v1 | ✓ v12 | ✓ v1 | ✓ v1 | ✓ v1 |
| Supported in all major browsers | |||||
Tip: slot only works inside shadow DOM / Web Components; in a normal page it has no distributing effect.
🏷️ Related Tags
💡 Related Cases
More case studies coming soon — check back later.