Free Web Hosting by Netfirms
Web Hosting by Netfirms | Free Domain Names by Netfirms

 
 
My Exam notes ON
Foundation Exam 1D0-410
HOME Course # 4

HTML fundamentals

CHAPTER # 4


Creating HTML Tables

  • Tables are used to arrange data in a tabular form
  • Tables are more useful for HTML page layout.
  • A table is created using the Table elements. They are decribed below.
Element
Tag
Usage
Table
<TABLE>
  • The main Table tag .
  • All other table tags located within it.
Table Caption
<CAPTION>
  • Optional element
  • This can be used to Caption the Table.
Table Row
<TD>
  • Required element.
  • All data for the purticular row.
Table Header
<TH>
  • Optional.element
  • This can be used to display the row heading.
  • By default all text appear in this tag will appear as bold centerd.
Table Data
<TD>
  • Required element.
  • Contains the Table cell data

Table alignment option

Attribute Values Used with Description
VALIGN
  • TOP
  • MIDDLE
  • RIGHT
  • <TD>
  • <TH>
  • <TR>
  • Vertically aligns the contents of the cells.
ALIGN
  • LEFT
  • CENTER
  • RIGHT
  • <TABLE>
  • <TD>
  • <TH>
  • <TR>
  • Horizontally aligns the contents of the table cells.
ALIGN
  • TOP
  • BOTTOM
  • <CAPTION>
  • CELLSPACING is an attribute to the <TABLE> tag, which sets the amount of white space arround the cells.
  • CELLPADDING is an attribute to the <TABLE> tag, which sets the distance of the cell data from the border.

Changing Height and Width

Attribute Values Used with Description
HEGHT
or
WIDTH

X Pixels

<TABLE>

Height is set to X pixels

X %

Height is set to X % of Window

X Pixels

<TD>

Height is set to X pixels

X %

Height is set to X % of the Table width

Colomn & Row Spanning

  • Several cells in a row can be merged by assigning a value, equal to number of cells to be merged to the attribute COLSPAN.
  • Several cells in a colomn can be merged by assigning a value, equal to number of cells to be merged to the attribute ROWSPAN.
c11 c12 c13 c14
c21 c22 c23 c24
c31 c32 c33 c34
c41 c42 c43 c44
  • In the above table the cells c11, c12, c13 & c14 can be merged togather by assigning a value of 4 to attribute COLSPAN of <TD> tag of c11.
  • Simillarly to merge c21, c31 & cc41 assign a value of 3 to attribute ROWSPAN of <TD> tag of c21.

 

 

 

 

 

 

TOP


Disclaimer
All the materials posted in this site are from my exam notes.They are correct best to the author's knowledge. The author disclaim any responsibility of liability for any direct or indirect damages occurred due the use of it. All product names and services posted are trademarks or registered trademarks of the respective Companies.

 

 

 

1