**`<font>`** let you inline-style a span of text's font, size (on an old, non-pixel 1-7 scale rather than real units), and color directly in the markup. HTML5 removed it entirely in favor of CSS — modern browsers apply no special styling to `<font>` at all, rendering it as plain, unstyled text, since separating structure (HTML) from presentation (CSS) is now the standard approach, offering vastly more control (any font, any unit, responsive sizing, gradients, and more).
1Understanding <font>
`<font>` let you inline-style a span of text's font, size (on an old, non-pixel 1-7 scale rather than real units), and color directly in the markup. HTML5 removed it entirely in favor of CSS — modern browsers apply no special styling to <font> at all, rendering it as plain, unstyled text, since separating structure (HTML) from presentation (CSS) is now the standard approach, offering vastly more control (any font, any unit, responsive sizing, gradients, and more).
The old size attribute on <font> used a relative 1-7 scale, not pixels or any real CSS unit — another reason it was replaced, since it offered far less precision than modern CSS sizing.
<!-- Old, deprecated, and non-functional -->
<font color="blue" size="6">Big blue heading-like text</font>2Practical Example
Here is a real-world application of <font> showing how it is used in production HTML.
<!-- Correct modern replacement -->
<span style="color: blue; font-size: 2rem;">Big blue heading-like text</span>3Best Practices
Follow these guidelines when working with <font>:
1. Never use <font> in new code — it has no effect in modern browsers
2. Use CSS font-family, font-size, and color properties instead, typically via a class rather than inline styles
3. Replace any legacy <font> tags found in old code with an equivalent styled <span> or CSS class
Tip: The old size attribute on <font> used a relative 1-7 scale, not pixels or any real CSS unit — another reason it was replaced, since it offered far less precision than modern CSS sizing.
<!-- Old, deprecated, and non-functional -->
<font color="blue" size="6">Big blue heading-like text</font>