font size and color

<font size="" color="">

Internet Explorer Firefox Opera
Inline Deprecated

The FONT element specifies the size and color of the font.

<font size="5" color="#ff0000">font size and color</font>

Attribute Value Explanation
size=" " 1 - 7 the size of the font (a number from 1 to 7)
color=" " color code or name the color of the font

The use of this element is deprecated. (Use CSS instead)

size="" (The size of the font)

Specify a number from 1 (small) to 7 (large).

Font size 1
Font size 2
Font size 3
Font size 4
Font size 5
Font size 6
Font size 7

You can also specify it like "+2" or "-2".

<basefont size="3"> (base font)
Font size -2 (= Font size 1)
Font size -1 (= Font size 2)
Base font size (Font size 3)
Font size +1 (= Font size 4)
Font size +2 (= Font size 5)
Font size +3 (= Font size 6)
Font size +4 (= Font size 7)

Tips and Notes

Use CSS instead of deprecated HTML. Please see the "Related Document" for details on CSS.


<p>Base font</p>
<p><font size="5">Font size 5</font></p>
<p><font size="-1">Font size -1</font></p>
<p><font color="red">Red color</font></p>
<p><font size="7" color="#00ff00">Font size 7 and Green color</font></p>

Base font

Font size 5

Font size -1

Red color

Font size 7 and Green color