Roots
Back

HTML Font

Should you use it?

The font tag in HTML is deprecated - you can mimic its functionality using CSS, and you should do this when you can. Until you are confident using CSS though, you can use the font tag;

<font> Text </font>

Font color

<font color="name / code"> Text </font>

name - Change the color of the text to the color name. There are many different words which are recognised, such as aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white, and yellow.

code - Change the color of the text to the color indicated by code. Have a look at the web-safe colors table for different codes to use.

Font face

<font face="name"> Text </font>

name - Changes the style of the text to the font face name.

Font size

<font size="number"> Text </font>

number - Changes the size of the text, either to the stated absolute size, or by increasing or decreasing the size by the amount given.