HTML Tips and TricksPost your HTML Related tips and tricks here
Notices
You are currently viewing AIOFORUM as a guest which gives you VERY limited access to view most discussions, Applications, Latest Movies & Tutorials and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload and Download content and access many other special features. Registration is fast, simple and absolutely free so please, Join our community today!
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