HTML Home
HTML Tags Reference
Selected Reading
© 2011 TutorialsPoint.COM
|
HTML <font> tag
Function:
The HTML <font> tag is used to specify the font of the text.
Difference between HTML and XHTML:
The font element is deprecated in HTML as well as in XHTML. So start using CSS.
Example:
<p>
<font face="cursive,serif" color="#ff9900" size="4">
The HTML font tag is now deprecated. You should use start using CSS to set font size and family.
</font>
</p>
|
This will produce following result:
The HTML font tag is now deprecated. You should use start using CSS to set font size and family.
|
Online Practice:
To Become more comfortable - Do Online Practice
Attributes:
Attribute | Value | Description |
color | rgb(x,x,x) #hexcode colorname
| Deprecated - Specifies the color of the text. |
face | List of font names | Deprecated - Specifies the font families. |
size | number | Deprecated - Specifies the font size from 1 to 7. |
Standard Attributes:
Attribute | Description |
class | Document wide identifier |
dir | Specifies the direction of the text |
id | Document wide identifier |
title | Specifies a title to associate with the element. |
style | Helps to include inline casecadubf style sheet. |
lang | Sets the language code. |
|
|
|