|
HTML <font> tag
Definition and Usage
The <font> tag specifies the font face, font size, and font color of text.
Differences Between HTML and XHTML
The font element was deprecated in HTML 4.01.
The font element is not supported in XHTML 1.0 Strict DTD.
Tips and Notes
Tip: Use styles (instead of the <font> tag) to define the font face, font size, and font color of text.
Example
Source Output <font size="3" color="red">
This is some text!
</font>
<font size="1" color="blue">
This is some text!
</font>
<font face="arial" color="red">
This is some text!
</font> This is some text! This is some text! This is some text!
Optional Attributes
DTD indicates in which DTD the attribute is allowed. S=Strict, T=Transitional, and F=Frameset.
Attribute Value Description DTD color rgb(x,x,x)
#xxxxxx
colorname Defines the color of the text in the font element. Deprecated. Use styles instead TF face list_of_fontnames Defines the font of the text in the font element. Deprecated. Use styles instead TF size A number from 1 to 7.
If basefont is specified you can specify a number from -6 to 6 Defines the size of the text in the font element. Deprecated. Use styles instead TF
|