<font>
The <font>
element was used to set the font characteristics of a text. It is now deprecated. Some CSS properties like the font
property should be used instead.
Syntax
At least one of the following three attributes is required for the <font>
element. However, any combination of them can be used:
color
: What color the font/text should be. The color can be set to a namedcolor
, hexadecimal or RGB.face
: What font the text should be. For example, to have the text beverdana
, theface
attribute would be set toface="verdana"
.size
: Sets the size of the font/text. It can use absolute units and relative units ranging from 1-7. Absolute units are used bysize="5"
or any other number 1-7. Relative units are relative the size of the<basefont>
element which is also deprecated. The attribute would look something like thissize="+5"
.
Example
<font color="pink">This text is pink</font><font size="5">This size is 5</font><font face="verdana">This text is in verdana font</font>