Name

fontVariant — NN n/a IE 4 DOM n/a

Synopsis

Read/Write

Whether the element should be rendered in all uppercase letters in such a way that lowercase letters of the source code are rendered in smaller uppercase letters. If a font family contains a small caps variant, the browser should use it automatically. More likely, however, the browser calculates a smaller size for the uppercase letters that take the place of source code lowercase letters. In practice, Internet Explorer 4 renders the entire source code content as uppercase letters of the same size as the parent element’s font, regardless of the case of the source code.

Example

document.all.emphasis.style.fontVariant = "small-caps"

Value

Any of the following constant values as strings: normal | small-caps.

Default

normal

Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.