Nesting Commands
The command structure is very important. In older versions of HTML it wasn't very important to keep track, and order, with your code. It isn't today either, actually. But it will be very important in the future of HTML. That is why I want you to learn now, while it's a bit forgiving, that code needs to be nested. It's not much of a problem to do, just as long as you realize that you must keep order.
Please take the time to learn this the proper way, so you don't have to learn it all over next year or the year after when the HTML Specification by W3C changes and upgrades. The W3C is the organization who controls and creates the specification that controls HTML and what browsers show to people surfing the web.
What we mean by that is ... all the code that you start must end in the same order.
Hmmm ... what did he say?
Here are two lines of code that accomplish the same thing:
<center><font face="verdana">Text Here</font></center><br>
<center><font face="verdana">Text Here</center></font><br>
Notice that they both start off with <center> and then <font> but that one ends with </center></font> and the other with </font></center>. Which is correct? The nested one. Think of it this way. The last code you started is the first one you end. Therefore the first instance is correct, the second wrong. As HTML progresses the second will give you an error. At this point in time it will still work. But as mentioned several times in this tutorial, learn to do it right now, and you won't have problems later.
That's nesting, really nothing more than that. Here's another example:
<b><i>Text Here</i></b> or <i><b>Text Here</b></i>
Tables are also nestable. Nestable? Is that actually a word. Probably not, but I like the way it sounds. The principle of nesting holds true for tables. You start one table, begin another within a cell of that table, and end it BEFORE you end that same cell of the first table. Nested within each other. A table within a table, actually, a table within a cell.
<table width="100%" border="1" cellspacing="0" cellpadding="5">
<tr align="center">
<td width="50%">Column One</td>
<td width="50%">
<table width="100%" border="1" cellspacing="0" cellpadding="5">
<tr align="center">
<td width="50%">Nested</td>
<td width="50%">Within this Cell</td>
</tr>
</table>
</td>
</tr>
<tr align="center">
<td width="50%">
<table width="100%" border="1" cellspacing="0" cellpadding="5">
<tr align="center">
<td width="50%">Nested</td>
<td width="50%">Within this Cell</td>
</tr>
</table>
</td>
<td width="50%">Second Column</td>
</tr>
</table>
Here is how this will look:
Did I hear you say you wanted an HTMLArea here to mess around with the nested table? Well, OK ... if you really insist I guess I can accommodate.
You Must Use IE Here ... NOT Firefox!
|