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

{{HTMLSidebar("Global_attributes")}}

The **`part`** [global attribute](/en-US/docs/Web/HTML/Global_attributes) contains a space-separated list of the part names of the element. Part names allows CSS to select and style specific elements in a shadow tree via the {{CSSxRef("::part")}} pseudo-element.

See our [Shadow part example](https://mdn.github.io/web-components-examples/shadow-part/) for a usage example.

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

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