Skip to main content

HTML Guide

Free site validation

Find out what web pages on your sites are affected by HTML issues.

The “font” element is obsolete. Use CSS instead.

The <font> element, used to define the font face, size and color in previous versions of HTML, is no longer valid in HTML5. Instead, you should rely on CSS styles.

For example, you can define a font size of 12px, bold text with inline styles like this:

<p style="font-size: 12px; font-weight: bold;">some text</p>

Learn more:

Related W3C validator issues