html5 Site Icon CSS3 Site Icon CSS Site Icon

HTML4 Reference

HTML <font> tag (deprecated)

Definition

The <font> tag is used for specifying font, font size and font colour.

The CSS font property allows you to set the above values as well as others with more control, so use that instead.

Example


<font face="arial">This text will be in the arial font.</font>

Required Attributes

NONE

Optional Attributes

color - this attribute is deprecated, use CSS instead.

face - this attribute is deprecated, use CSS instead.

size - this attribute is deprecated, use CSS instead.

Common Attributes

class - specifies a classname for the element allowing you to apply the style of the predefined class to the content.


<font class="classname">Some text here</font>

id - specifies a unique id for the element allowing you to apply the style of the predefined id to the content.


<font id="idname">Some text here</font>

style - specifies an inline style for the element allowing you to apply the style to the content.


<font style="color:red;text-align:left">Some text here</font>

title - specifies extra information about the content.


<font title="information about the content">Some text here</font>

Language Attributes

dir - specifies the directional flow of the content.


<!-- The text will flow from left to right -->
<font dir="ltr">Some text here</font>

<!-- The text will flow from right to left -->
<font dir="rtl">Some text here</font>

lang - specifies a language code for the content of the element.


<font lang="en">Some text here</font>

Event Attributes

NONE



<fieldset> tag    << Prev          Next >>   <form> tag

go to home page Homepage go to top of page Top