JavaScript Tutorial

HTML Fonts

Warning! The <font> tag is deprecated in HTML5 and should not be used. Instead, use CSS properties to modify fonts.

The Font Tag in HTML is an important attribute used to enhance the appearance of web pages or HTML documents.

This tag primarily operates on three main attributes: size, face or type, and color. The Font tag works as an inline element in HTML, allowing users to change certain features of block text in HTML documents.

Font Face

This font face attribute is used to define the font type for included text.

Font Size

This font face attribute is used to define the font type for included text.

Font Color

This font face attribute is used to define the font type for included text.

Changing Font Style Using the Inline-Style

We can also change font properties by using inline-style attribute. Following example shows you how to change font style, font color and it's size using inline-style attribute.

Supporting Browsers

Element

“Google Chrome

Microsoft

Firefox

Opera

Safari

Font

Yes

Yes

Yes

Yes

Yes

Go back to Previous Course