How To Properly Nest Tags

Nesting Tags is simply the process of applying more than one tag to the same block of text or object.

Let's take a simple font tag for example:

<FONT SIZE="2">Nesting the Tags</FONT>

Here is how it looks on your page:

Nesting the Tags

Now let's say we want to have that text appear bolded. We have to add the Bold Tag set around the text we want to affect:

<FONT SIZE="2"><B>Nesting the Tags</B></FONT>

Here is how the newly bolded text will appear on your page

Nesting the Tags

Now let's add a third tag to our text. Let's display our text in Italics by adding the Italics Tag set to our text:

<FONT SIZE="2"><B><I>Nesting the Tags</I></B></FONT>

Now our text will be displayed like this:

Nesting the Tags

Learning how to properly nest multiple tags around one block of text or an object is crucial to successfully coding your web pages.

If you look at our example above, the opening tags have been put in a certain order and the closing tags ALL appear in the EXACT OPPOSITE ORDER. For example:

<TAG1><TAG2><TAG3> [text or object here] </TAG3></TAG2></TAG1>

Making sure you have your multiple tags nested properly takes a little getting used to, but if you get into the habit at the very beginning it will become second nature to you in short order. In no time at all you will be coding properly without even thinking about it.


Return to the Tutorial Menu HTM-Hell: HTML For Newbies
Email: webmaster@gazoo.net

  Design and Tutorials by Gazoo, Infinity International ©1998  

Click Here!