Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is the font element not supported in HTML5?

Tags:

html

I am just curious really and hope that someone can reveal the method in the madness of the W3C. What is the reason for not supporting this element in the latest HTML5 standard? I know the element was deprecated in HTML 4.01, but I don't understand why.

It seemed perfectly logical to me, you have a a paragraph of text and just wish to change the font, or to identify, lines or words from it using the font element, now the only way to do the job is with the span element. It seems strange to me that there are so many ways to create a block of text, using div, section, or just paragraph, but to wrap a few keywords or any inline content, there is only the span element.

And really, one little element can't do any harm, so why not still support it?

Thank you,

Luke

like image 503
Luke T O'Brien Avatar asked Sep 25 '13 09:09

Luke T O'Brien


People also ask

Is font supported in HTML5?

Not Supported in HTML5. The <font> tag was used in HTML 4 to specify the font face, font size, and color of text.

Which element is not supported in HTML5?

Some attributes from HTML4 are no longer allowed in HTML5 at all and they have been removed completely. img and iframe. caption, iframe, img, input, object, legend, table, hr, div, h1, h2, h3, h4, h5, h6, p, col, colgroup, tbody, td, tfoot, th, thead and tr. table, tr, td, th and body.

Is font tag deprecated in HTML5?

The <font> element, along with most other style and design oriented HTML features, has been deprecated in HTML5. The correct way to control fonts and other styling is through CSS.

Which HTML version does not support the font tag?

The <font> tag is not supported in HTML5. Use CSS instead. The <font> tag specifies the font face, font size, and color of text.


1 Answers

In short:

HTML is a markup language. Use it to mark up the different sections of your content using the most semantically accurate element.

CSS is used for styling purposes, such as changing colors, sizes, fonts, etc.

The <font> element was used for styling, not marking up a section of your content. That's why it's deprecated, along with other out-of-place elements such as <center>.

like image 94
Nils Kaspersson Avatar answered Oct 03 '22 07:10

Nils Kaspersson