Tags have attributes

This note introduces the idea of attributes of HTML tags. We will use the <font> tag as an example.

The <font> tag has two attributes: size and color. Study these examples (use the view > source command) to see how the attributes modify the appearance of the text:

Small, red text
Medium, green text
Large, blue text

Note that attributes have values. For example, on the first line above, the value of the color attribute is red.

The general form of an attribute/value pair is:

attribute name = "value"
The attributes have default values, which will be used if you do change them. For example, the default value of the color attribute of the <font> tag is black.

Disclaimer: The views and opinions expressed on unofficial pages of California State University, Dominguez Hills faculty, staff or students are strictly those of the page authors. The content of these pages has not been reviewed or approved by California State University, Dominguez Hills.