Learn HTML step-by-step from A to Z or improve your professional skills.  Home HTML and CSS Tutorials Tricks using Tables
Your Ad Here

Tricks using Tables

Browse Pages: << < 2  3  4  5  6  > >>

Actually, there are two solutions to this problem. One is to use the <PRE> tags for presenting preformatted text. The problem with this solution is that the text you are presenting must be properly aligned. If it is not- here is how to solve your problem very easily using tables.

Example

In the example I am using borders so you can see what is doing. If you do not want border, just remove the BORDER= attribute. It is best not to set it equal to 0 as some browsers may just see the BORDER attribute and put one there anyway.

Account Catagory January February
Cash on Hand $15,123.45 $20,123.45
Stocks and Bonds $5,233.00 $454.42
Inventory $155,212.00 $65,111.02

Source code

<TABLE WIDTH=400 BORDER=1>
 <TR>
  <TH ALIGN=LEFT>Account Catagory</TH>
  <TH ALIGN=RIGHT>January</TH>

  <TH ALIGN=RIGHT>February</TH>
 </TR>
 <TR>
  <TD ALIGN=LEFT>Cash on Hand</TD>
  <TD ALIGN=RIGHT>$15,123.45</TD>

  <TD ALIGN=RIGHT>$20,123.45</TD>
 </TR>
 <TR>
  <TD ALIGN=LEFT>Stocks and Bonds</TD>
  <TD ALIGN=RIGHT>$5,233.00</TD>

  <TD ALIGN=RIGHT>$454.42</TD>
 </TR>
 <TR>
  <TD ALIGN=LEFT>Inventory</TD>
  <TD ALIGN=RIGHT>$155,212.00</TD>

  <TD ALIGN=RIGHT>$65,111.02</TD>
 </TR>
</TABLE>

See Also:



Author's URL: Jeff Singer
Thank you for voting.
Rate this Materials:
Bad 
1 2 3 4 5 Excellent
Browse Pages: << < 2  3  4  5  6  > >>
print this page subscribe to newsletter subscribe to rss

HTML is Hyper Text Markup Language that is used to make hypermedia and hypertext documents for the Web. More HTML and CSS: Most Popular Materials | Fresh Materials | More HTML Tutorials at Markuptutorials.com

Add comments to "Tricks using Tables"

Only registered users can write comment

No comments yet...