pseudo-class

:heading — CSS reference

Draft selector for heading elements according to the document language. An explicit h1 through h6 selector list is a fallback for HTML. The local engine rejects this syntax; the base styling remains available.

Formal Syntax & Structure

css syntaxcss
:heading { color: blue; }

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>:heading</title><style>body{margin:8px;background:white;color:black;font:16px/20px sans-serif}*{box-sizing:content-box}h1,h2,h3,h4,h5,h6{color:green}:heading{color:blue}</style><body><h2 id="a">Section</h2></body></html>
CSS Reference