# Pseudo-element

Styles part of an element, or adds decoration, with two colons.

## What is a **pseudo-element**?

A **pseudo-element** styles a part of an element, or adds something that isn't in the HTML, like a first line or decoration before it. It starts with two colons.

```css
p::first-line { font-weight: bold; }
.required::after { content: " *"; color: red; }
```

Level: Apprentice · [More CSS terms at this level](https://www.ask-codey.com/glossary/subjects/css/apprentice)

Updated: September 27, 2026

Source: https://www.ask-codey.com/glossary/pseudo-element
