annotation() CSS Function
The annotation() function selects an annotation alternate of a font, such as circled or boxed numbers, with font-variant-alternates.
Description
The annotation() CSS function is one of the functions used with the font-variant-alternates property to switch on alternative glyphs in an OpenType font. It enables alternate annotation forms: characters drawn inside circles, boxes or parentheses, or with other notational styling, such as circled numbers for steps. It maps to the OpenType nalt feature.
The argument is not a number but a name that you define yourself in a @font-feature-values rule for the font family, inside a @annotation block. That rule maps the friendly name to the numeric index the font uses, so the same name can mean different glyph sets in different fonts. If the font has no matching feature, or no name is defined, the text is shown with its normal glyphs.
Only one name can be given. Annotation forms are especially common in CJK fonts.
@font-feature-values "Noto Sans JP" {
@annotation {
circled: 4;
}
}
.step-number {
font-family: "Noto Sans JP", sans-serif;
font-variant-alternates: annotation(circled);
}
Syntax
annotation() = annotation( <feature-value-name> )
Values
- <feature-value-name>A <custom-ident> defined in the @annotation block of an @font-feature-values rule for the font family. It maps to the font's OpenType nalt (alternate annotation forms) feature.
Example
Browser Support
The following information will show you the current browser support for the CSS annotation() function. Hover over a browser icon to see the version that first introduced support for this CSS function.
Desktop





Tablets & Mobile





