headingfunction
An experimental pseudo-class function that targets a heading of a specific level or relative level (e.g., :heading(2) for h2).
This is an experimental technology. The syntax and behavior are still subject to change.
Syntax
/* Usage Example */
:heading(1) {
/* Specifically targets top-level headings */
font-size: 3rem;
text-transform: uppercase;
}
headingfunction Browser support
Limited availability
Since
2020 Unknown global usage
This feature is not Baseline because it does not work in some of the most widely-used browsers.
preview+