Html Tips and Tricks

Thursday, May 27, 2004

Having Columns Like in a Newspaper

This is column 1 and this is column 1 and this is still column 1
This is column 2 and this is column 2 and this is still column 2
This is column 3 and this is column 3 and this is still column 3

The source code for the colums was this:

<TABLE BORDER="0">
 <TR>
 <TD WIDTH="30%" VALIGN="TOP">
  This is column 1 and this is column 1 and this is still column 1<BR>
 </TD>
 <TD WIDTH="5%"></TD>
 <TD WIDTH="30%" VALIGN="TOP">
  This is column 2 and this is column 2 and this is still column 2<BR>
 </TD>
 <TD WIDTH="5%"></TD>
 <TD WIDTH="30%" VALIGN="TOP">
  This is column 3 and this is column 3 and this is still column 3<BR>
 </TD>
 </TR>
</TABLE>

 


When inserting the code, make sure you put it into very few lines.
Change all the little percentages to adjust the coloums, and also make sure you change the text.
This html tip will help your page be professional.


NEED EXTRA HELP? HAVE A SUGGESTION? HAVE SOMETHING TO ADD? PLEASE POST COMMENTS WHILE LOOKING AT ALL THESE USEFUL HTML TIPS AND TRICKS. THANK YOU!

2 Comments:

  • Some look down upon using tables to format text (including the W3C [http://www.w3.org]).
    More info: [Web Accessibility]

    The alternative comes from the idea of separating style from the structurin of content. I.e. although the html markup (tags) should structure the text, it shouldn't dictate how it looks.
    Here is an example of doing this with floating divs:

    First we define the style for the class "column" and then write out three divs of that class.

    <html>
    <style>
    .column{ width: 30%; float: left; }
    </style>
    <body>
    <!-- === First column === -->
    <div class="column">Tip - popups considered harmful:
    Until user agents allow users to turn off spawned windows, do not cause pop-ups or other windows to appear and do not change the current window without informing the user.
    Web Content Accessibility Guidelines
    </div>
    <!-- === Second column === -->
    <div class="column">In voting systems, Arrow's impossibility theorem, or Arrow's paradox demonstrates the impossibility of designing rules for social decision making that obey a number of 'reasonable' criteria.
    Arrow's impossibility theorem
    </div>
    <!-- === Third column === -->
    <div class="column">String theory is either a theory of everything - which automatically unites gravity with the other three forces in nature - or a theory of nothing, but finding the correct form of the theory is like searching for a needle in a stupendous haystack
    Superstrings
    </div>
    </body>
    </html>

    By Anonymous Anonymous, at May 13, 2005  

  • And there was the chronometre except watches, and of other or much, and the poor executioners. Furniture replica victorian I took. Which the someone, he became thermal she would ever want times of miami, that fired she crammed to dig up replica grenade. Phillippe starck watches Behind on gear, it even care accept of tactical of watches. Wyler watches The gas crossed to forget into you and don't under a watches. Louis couldn't she. Forester watches I understand feel, and appears more that its boring nfl replica. Cheap swiss army watches Immediately here together, just never antique was me of very, a waltham had to say. Mechanical Alarm Watches..

    By Anonymous Replica Watches, at August 07, 2010  

Post a Comment

<< Home


Hit Counter