On this page
<font>
Prev: `<center>` | Up: text | Next: forms
Rel: CSS font-family, text, Text & Lists Guide
Ref: MDN Web Docs — <font>
Tags: #public #web #html #elements #text #tier/legacy
Summary
Obsolete presentational element for font face, size, and color.
Legacy / Avoid: Prefer CSS font-family in all new markup.
- Implicit ARIA Role:
generic - DOM Interface:
HTMLFontElement - Key Attributes:
—
Notes & Best Practices
- Obsolete & deprecated: Never use
<font color=... size=...>—style typography with CSS (color,font-family,font-size).
Example
<!-- Replace <font> with CSS classes -->
<span class="highlight">Styled text</span>
Linked from
Related notes
- tuts/html/elements/text/center Linked here; links to this page; shared tags: #elements, #html, #text, #tier, #web
- tuts/html/elements/text Linked here; links to this page; shared tags: #elements, #html, #text, #web
- tuts/html/elements/forms Linked here; shared tags: #elements, #html, #web
- tuts/html/elements/text_and_lists Linked here; shared tags: #elements, #html, #web
- tuts/css/properties/typography/font-family Linked here; shared tags: #tier, #web
- tuts/html/elements/text/a shared tags: #elements, #html, #text, #tier, #web
- tuts/html/elements/text/code shared tags: #elements, #html, #text, #tier, #web
- tuts/html/elements/text/div shared tags: #elements, #html, #text, #tier, #web
- tuts/html/elements/text/dl shared tags: #elements, #html, #text, #tier, #web
- tuts/html/elements/text/h1 shared tags: #elements, #html, #text, #tier, #web