# `<summary>`

> The `<summary>` HTML element provides a visible heading or title for the content within a `<details>` element.

## How do I remove or change the arrow on an HTML summary element?

The element that provides a summary or caption for the content of a `<details>` element. It acts as a clickable header, which, when clicked, toggles the visibility of the content within the `<details>`.

- Topic: Interactive
- Type: tag
- Browser support: Chrome 12+, Chrome Android 18+, Edge 79+, Firefox 49+, Firefox Android 49+, Safari 6+, Safari iOS 6+

## Example

Wrong:

```css
summary {
  list-style: none;
}
```

Right:

```css
summary {
  list-style: none;
}
summary::-webkit-details-marker {
  display: none;
}
```

Safari draws the marker with a WebKit pseudo-element, so both rules are needed to hide the arrow everywhere.

## Common mistakes

- Putting a `<button>` inside `<summary>`, which creates nested interactive controls.
- Hiding the marker with `list-style: none` only, leaving it visible in Safari.

## Key points

- `<summary>` is the first child of a `<details>` element.
- `<summary>` contains no buttons, links or other interactive elements.
- Hiding the arrow also covers WebKit with `summary::-webkit-details-marker`.

## Interview questions

### Can I put a heading inside summary?

Yes, it is valid, but `<summary>` acts as a button, so some screen readers do not announce the heading level.

### What happens if details has no summary?

The browser shows a default label such as 'Details'. Always add your own `<summary>` with clear text.

### How do I style the summary arrow?

Use `summary::marker` to change its color or content, or hide it and add your own icon with `::before`.

## Related cards

- [`<details>`](https://wonderium.dev/html/details.md)
- [::marker](https://wonderium.dev/css/marker.md)
- [list-style](https://wonderium.dev/css/list-style.md)
- [button](https://wonderium.dev/a11y/button.md)

---

- Level: [HTML](https://wonderium.dev/html.md)
- HTML version: https://wonderium.dev/html/summary
- Last updated: 2026-11-25
