---
title: slot
slug: Web/HTML/Global_attributes/slot
tags:
  - Global attributes
  - HTML
  - Reference
browser-compat: html.global_attributes.slot
---

{{HTMLSidebar("Global_attributes")}}

The **`slot`** [global attribute](/en-US/docs/Web/HTML/Global_attributes) assigns a slot in a [shadow DOM](/en-US/docs/Web/Web_Components/Using_shadow_DOM) shadow tree to an element: An element with a `slot` attribute is assigned to the slot created by the {{HTMLElement("slot")}} element whose {{htmlattrxref("name", "slot")}} attribute's value matches that `slot` attribute's value.

For examples, see our [Using templates and slots](/en-US/docs/Web/Web_Components/Using_templates_and_slots) guide.

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- All [global attributes](/en-US/docs/Web/HTML/Global_attributes).
