HTML Font Codes

If you'd like to manipulate the text on your page, understanding the HTML font code is important. There are a couple of main things to consider - attributes and variables. One of the ways in which text can be manipulated is with the use of CSS files, where you can create classes requiring you to set the style once. When writing your HTML pages, you would use the class attribute to specify the look of that particular part of the text.

Attribute Example Purpose
class="class-name" class="menu" Specifies which class in CSS file
color="color-value" color="#CC00EE" Indicates the font color
color="color-name" color="red" Indicates the font color
face="face name" face="Times" Indicates the font name
language="name" language="xml" Defines the programming language
point-size="number" point-size="12" Indicates the font point size
size="number" size="2" Indicates the font size
size="+number" size="+1" Increases the font size
size="-number" size="-1" Decreases the font size

Understanding HTML font codes isn't the only thing that a webmaster should know. Font names and colour codes are also of great importance. For the colour attribute, please check the HTML colour code chart.