Tutorials & Script Homepage
HTML/DHTML 1to7
HTML - Lists
Using iFrames
Background Colours
Basic Tables
Advanced Tables
Tables Tricks 'n' Tips
Tip Boxes
advertisment
advertisement
advertisement
Host With Us: HostingHelper.co.uk From Only $5.00p/m
Spotted an Error ? Let us Know
100's more FREE templates at FreeWebTemplates
Looking for a new Web Host ?
Free templates from TemplatesLand
Professional High-End Templates
TemplateBox.com more FREE templates
Free Flash Templates and Intros
advertisement
 
HTML/DHTML TUTORIAL NUMBER : 04
Please Click Here, and Help Keep This Site FREE to Use
 
Please click on our sponsors advert to the right if you download or use anything from this page.
Thank you for your help.
This tutorial has been created by: infinite-fire.net

Basic Tables

HTML Tutorial - Basic Tables
So, you've got all this content (read: stuff), and want to arrange it on your website eh? Well there are two main ways of doing it, one using HTML, and one using CSS, we're going to concentrate on the HTML method here - tables.

Example
Tables were the original way to arrange content, and can get messy... so im gonna try and make you write clean code (so it'll work in most major browsers). What is a table? The very tutorial you're reading is arranged in a table! click here to see it with borders. Now, as you can see, the page is split up into 2 segments - two rows, and one column - yes? good. The code to create that layout is show below :

<table width="425" border="0">
<tr>
<td>title</td>
</tr>
<tr>
<td>actual tutorial</td>
</tr>
</table>

If this is you're first attempt at tables, that might seem like quite a mouthful, really it isn't - its just the same thing, three tags repeated a few times - note that ALL tags have closing tags (see diagram) - this is to prevent *very* ugly pages, particularly in Netscape. For the purpose of explanation, i have written in red italics, the content in each cell, putting this description in the code would NOT generate the same page!

Explanation
The <table> and </table> tags simply open and close the table, allowing you to use the <tr><td> etc. tags. <tr> opens a new Table Row - making more sense now? What would you put in a row of a table? Data of course! hence the <td> tag - Table Data

What is table data?
Table data can be ANY html element, including other tables! Common uses are arranging images and text, for example on news sites, where u will very often see a layout like this:

HEADLINE
image article text


Seen at the snazzy new design of nufc.co.uk - now you know how to do it! this layout is acheived by utilising the colspan attribute - <td colspan="2"> - as you can see, the column span is two, i.e. it spans two columns, this is used a lot! NOTE: although not neccissary the " quotation marks are recommended, and if you want your site to be compatible with most browsers I definately recommend you use them

Going further...
Tables can be as complicated, or as simple as you like, here is the simplest possible table :

SIMPLE TABLE


as you can see, it is only one cell... however they can also become complicated...
         
       
     
 
     
     
 

obviously you probably wouldnt ever HAVE to use that complicated a table... its just overcomplicated to demonstrate that tables DO get complicated (my old front page being a prime example)

I hope this came in useful!
Ask in the forum if you have any suggestions or comments.

Web Hosting  |  Membership website templates  |  Reliable UK Web Hosting  |  dresses  |  Art Web Templates  |  Cheap Flight Deals  |  UK Web Hosting Company  |  Coursework Writing  |  Reseller Hosting  |  coches de ocasion  |  Cheap UK Web Hosting  |   cell phones  |  Web Design  |  Low Cost Domain Names  |  Website templates  |  master a distancia  |  Austin Web Design  |  Flash Templates  |  Factory  |   cell phones  |  Canadian Web Hosting  |  Flash Intros  |  Web Templates  |  cartuchos  |  Corporate Logo Design Service  |  Website Templates  |  Bespoke Software Development  |  Domain Name Registration  |  Free Website Templates  |   Dedicated Server  |  UK Web Hosting  |  Dating Software - aeDating 4.1  |  Website Templates  |  Power Saver  |  taobao agent  |  Flash templates  |  Lolita Dresse  |  china wholesale  |  Canadian Web Hosting  |   Cheap Web Hosting Deal  |  Linux Hosting  |  Web Design uk  |  Web Hosting  |  Business web directory  |  Electronics  |  Free domain names  |  Best UK web Hosting  |  Shower Enclosures UK  |  

 
advertisment
advertisment
advertisment
  Top-end templates
  Flash Templates
  Web Hosting UK
  Made-in-China.com
  Web Design Tips
  Web Hosting Reviews
  Web hosting reviews
  Website Design
  Cheapest web hosting
  Stock Photography
  Bildagentur
  Reseller Hosting
  Company Logos
  Website Templates
  Website Templates
  Web Hosting UK
  templatebox.com
  freewebtemplates.com
  templatesland.com
  topfreegraphics.com
  freegraphicland.com
  free-templates-layouts
  Logo Design Software
  Layouts4Free
  Webmaster Resoucres
  Web Templates Factory
  Free Web Templates
  Free Templates Catalog
  Web Templates
  Reseller Web Hosting
  Stock Photography
  Animations-galore.com
  4print.com.au
  Host Review
  Web Hosting Host Color
  Dedicated Servers
  FlashTemplateDesign
  ZeroDollarTemplates
  Killersites.com
  how-to-build-websites
  Build a free website
  web Hosting
  Business Logo Design
  Templates Favpage
  webmastermind.de
  flasheasy.com
  More Featured Sites