Global Attributes

HTML slot attribute

Assigns a light-DOM child to a matching named slot in its parent's shadow tree. A slot without a matching assignment may render fallback content. Applicability: global HTML attribute, subject to element-specific restrictions and browser support.

Formal Syntax & Structure

html syntaxhtml
slot="title"

Parameters & Attributes

NameTypeDescription
slotslot nameAssigns a light-DOM child to a matching named slot in its parent's shadow tree. A slot without a matching assignment may render fallback content.

Working Example

Example Snippethtml
<div>  <template shadowrootmode="open">    <slot name="title">Untitled</slot>  </template>  <span slot="title">Notebook</span></div>

Browser Compatibility

Minimum supported versions across modern rendering engines

Chrome
53
Yes
Firefox
63
Yes
Safari
10
Yes
Checked desktop BCD snapshot: global slot attribute. Versions denote the recorded start of support (≤ means at least that early), not a guarantee of all behavior. Unresolved mirror and preview rows omitted.
HTML Living Standard
HTML Reference