---
source: https://iinventedlight.com/library/notes/css-pseudo-elements.md
title: "CSS pseudo-elements: targeting extra elements without more HTML"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "CC-BY-4.0 (web.dev); CC-BY-3.0 (web.dev); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "Summary by iinventedlight (AI-assisted). Sources: web.dev, Pseudo-elements; web.dev, Pseudo-elements (source). CC-BY-4.0 (https://web.dev/learn/css/flexbox). Copyright Google LLC. web.dev text is CC BY 4.0. CC-BY-3.0 (https://raw.githubusercontent.com/GoogleChrome/web.dev/main/LICENSE). Copyright Google LLC. Except as otherwise noted, the content of this site is licensed under the Creative Commons Attribution 3.0 License."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-24
status: published
approved_by: "Cole Withington, 2026-11-27 14:30 PT: \"Yes, publish all of that now\""
checked_on: 2026-11-24
as_of: 2026-11-24
confidence: medium
untested: "Not reproduced (2026-11-24). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-web: css-pseudo-elements"
tags: [css, pseudo-elements, first-letter, before, after]
client: Librarian
sources:
  - id: S1
    title: "Pseudo-elements"
    publisher: web.dev
    url: https://web.dev/learn/css/pseudo-elements
    accessed: 2026-11-24
    license: "CC-BY-4.0"
  - id: S2
    title: "Pseudo-elements (source)"
    publisher: web.dev
    url: https://raw.githubusercontent.com/GoogleChrome/web.dev/main/src/site/content/en/learn/css/pseudo-elements/index.md
    accessed: 2026-11-24
    license: "CC-BY-3.0"
---
# CSS pseudo-elements: targeting extra elements without more HTML
**Answer:** A CSS pseudo-element lets you target or add an extra element without adding more HTML.

## First letter and other roles

The first-letter pseudo-element can style a drop cap on the first letter of a paragraph.

Pseudo-elements have a range of roles besides that design detail.

## Before and after

The before and after pseudo-elements add a child only when a content property is defined.

Both the before and after pseudo-elements create a child inside an element only if a content property is defined.

## See also

- [css-pseudo-classes](https://iinventedlight.com/library/notes/css-pseudo-classes/)
- [css-selectors](https://iinventedlight.com/library/notes/css-selectors/)
- [css-typography](https://iinventedlight.com/library/notes/css-typography/)

## Claims

- id: C1
  claim: A pseudo-element can target an extra element without adding more HTML.
  source: S1
  evidence: "adding or targeting an extra element without having to add more HTML"

- id: C2
  claim: The first-letter pseudo-element can create a drop cap.
  source: S1
  evidence: "you can use the ::first-letter pseudo-element to achieve this sort of design detail"

- id: C3
  claim: A pseudo-element can target an extra element without adding more HTML.
  source: S2
  evidence: "adding or targeting an extra element without having to add more HTML"

- id: C4
  claim: The first-letter pseudo-element can create a drop cap.
  source: S2
  evidence: "you can use the `::first-letter` pseudo-element to achieve this sort of design detail"

## Sources

- [S1] Pseudo-elements. web.dev. https://web.dev/learn/css/pseudo-elements . License: CC-BY-4.0. Accessed 2026-11-24.

- [S2] Pseudo-elements (source). web.dev. https://raw.githubusercontent.com/GoogleChrome/web.dev/main/src/site/content/en/learn/css/pseudo-elements/index.md . License: CC-BY-3.0. Accessed 2026-11-24.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: web.dev, Pseudo-elements; web.dev, Pseudo-elements (source). CC-BY-4.0 (https://web.dev/learn/css/flexbox). Copyright Google LLC. web.dev text is CC BY 4.0. CC-BY-3.0 (https://raw.githubusercontent.com/GoogleChrome/web.dev/main/LICENSE). Copyright Google LLC. Except as otherwise noted, the content of this site is licensed under the Creative Commons Attribution 3.0 License. Text was condensed and changed from the originals.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
