CSS Pseudo-Elements
Using `::before`, `::after` and other pseudo-elements to add decorative and generated content without extra markup.
Content tagged pseudo-elements
Tutorial:CSS Custom Highlight API:
::highlight()for Search ResultsHighlight search matches with CSS without touching the DOM.Highlight search results with the CSS Custom Highlight API: ::highlight(), CSS.highlights, StaticRange, priority, accessibility and a mark fallback.Tutorial:CSS-Only Tooltips with
attr()andcontentStyled, keyboard-friendly tooltips from one HTML attribute — no JavaScript.Build CSS-only tooltips that read their text from an HTML attribute with content: attr() — positioned with a ::after pseudo-element, given an arrow, revealed on hover and keyboard focus, flipped below the element and kept gentle under reduced motion — plus the accessibility limits and pitfalls to know before shipping one.Tutorial:Pure CSS Carousels with
::scroll-markerand::scroll-button()Build carousel dots and arrows with pure CSS.Build CSS-only carousel dots and prev/next arrows with ::scroll-marker, ::scroll-button() and :target-current: no JavaScript, plus accessibility and fallbacks.