Web Design

Site Information

More Boogie Jack Sites

Introduction to HTML

Part 3 of 4

If you've been following along, you've already learned what HTML tags are. Now we introduce HTML tag modifiers. A tag modifier is an attribute and value added to an HTML tag that changes the HTML element from its default value. For example, the default color of a web page background is white in the majority of browsers. By adding an attribute and value to the body tag, for example...

<body bgcolor="green">

...all browsers would display a page with a green background color that had that modifier coded into the body tag. In the above tag, body is the HTML command. The attribute and value I've added to the HTML body command is this:

bgcolor="green"

In this example, bgcolor is the attribute. An attribute is merely a modifier for an HTML command (also called an element) - in other words, it tells the browser to alter the default value for the command. In this case, it's telling the browser to change the default bgcolor (background color) of the page to the value of green.

So then, an attribute is a tag modifier, and has a value attached to it by the equal sign (=), and the value is enclosed in quotation marks. Here's a graphic that may make it easier to understand:

HTML tag diagram.

In the above example, I used a div (division) tag* with an align attribute and center value. What that does is makes any content that follows be centered on the page, until a </div> tag occurs, or another tag overrides it.

If it seems complicated, relax, it just takes seeing it a few times before it all starts making sense. In the next step we'll have you make a simple web page in just minutes so you can see how easy it really is!

* Tag, element, and command are often used interchangeably. Tag is technically the element or command AND the arrow containers. Element and command are the same thing.