JasonsJungle.com
Affordable, Customized Website Development
E-Commerce, Member sites, Shopping Carts, etc.
PHP, Perl, ASP, MySQL, XML, HTML, Javascript, etc.
   About Us
   Services
   Pricing
   Free Estimates
   F.A.Q.
   Portfolio
   Testimonials
   Knowledgebase
   Links
   Contact
HTML Tip: Consolidating Tags

Notice anything repative about the following block of code?

<DIV ALIGN="CENTER"><H4>Congress Passes New Bill</H4></DIV>
<DIV ALIGN="CENTER"><H2>Another attempt to simulate the ecomony</H2></DIV>
<DIV ALIGN="CENTER">By: John Smith</DIV>

Yes, all 3 lines are centered! But all three lines have their own individual centering tags. This code could be consolidated like this:

<DIV ALIGN="CENTER">
<H4>Congress Passes New Bill</H4>
<H2>Another attempt to simulate the ecomony</H2>
By: John Smith
</DIV>

In the second code snippet, there is only 1 centering tag that effects all three lines. There is no need to center each line individually.

If techniques like this are practiced a hundred times over throughout a lengthly HTML document, it can really make a difference in the document's filesize, shortening the loading time and bandwidth.


Related Articles:

HTML Tip: ALIGN="CENTER" doesn't work in the <IMG> tag!

HTML Tip: Usage of fancy Fonts = waste of code!
Others won't see your fancy font faces unless they've installed those exact same fonts too!


A little known HTML fact


Keep your files smaller