Table tag

The <table> tag is consisting of rows and columns. Table is intended for displaying the data in columns on web page. All table related tags included between the <table></table> tags. Each row of a table is described between the <TR></TR> tags, and each column of the table is described between the <TD></TD> tags.

There are two types of table row:

  • Header rows :- The header row is define using <TH></TH> tags. The content of header row is automatically centered and appears in boldface.
  • Data rows :-  The data row is define using <TD></TD> tags.

The attributes used in <table> tag.

  • ALIGN :- The ALIGN attribute used to control the horizontal alignment. Align accept the three values Left,Right and center.
  • VALIGN :- The VALIGN attribute used to control the vertical alignment. Valign accept the three values Top,Bottom and Middle.
  • WIDTH :- The WIDTH attribute is used to specific number of pixels or percentage of the available screen width.
  • BORDER :-The BORDER attribute is used to controls the border that placed around the table.