|
With lots of different <div> tags in a page, it can be
confusing when looking at your HTML code. Which div starts where, and
where does it end? Often, you end up with something similar to:
<div id="wrapper"> <div id="nav"> <div id="main"> </div> </div> <div>
But
how do you know, easily, which one is the wrapper, which one is the
navigation, and which one is the footer? By using html comments. The
syntax is:
<!--html comment in here-->
So you might have:
<div id="wrapper"><!--start of wrapper div--> <div id="nav"><!--start of navigation div--> navigation stuff </div><!--end of navigation div--> <div id="main"><!--start of main content div--> main content </div><!--end of main content div-->
</div><!--end of wrapper div-->
That
way, with just a quick skim through your HTML, you can see where one
<div> starts and ends, without spending ages and end up getting
confused!
|