हिंदी

Tables

Advertisements
  • <TABLE> Tag
  •  <TR>, <TH> and <TD> tags:
  • COLSPAN and ROWSPAN

Tables

<TABLE> Tag 

In HTML, table can be created by <TABLE> start tag and <TABLE> end tag. With <TABLE> tag you can determine the following formatting options for your table: 

  1. Width of table. (WIDTH)
  2.  Alignment of entire table. (ALIGN): This attribute specifies horizontal alignment of the table. It can take value as LEFT,RIGHT and CENTE
  3. Cell Borders and table border width. (BORDER)
  4.  Spacing between each neighboring cell (CELL SPACING): You can create more space in between each cell in your table with this attribute. It takes integers as values.
  5.  Padding within a cell. (CELL PADDING):  Using this attribute we can increase the amount of space in between the cell border and the cell data.

<CAPTION> tag is used to create a caption on top of or below the table. It can be used with ALIGN attribute. Note, Caption is always displayed outside the table's border. 

<TR>, <TH> and <TD> tags: 

<TR> is table row tag. The start tag is <TR> and end tag is< /TR>. It creates a horizontal row of cells and contains table headings(<TH>) and table data(<TD>). <TR> tag can include several attributes : BG COLOR, ALIGN, and VALIGN. VALIGN is a new attribute. It is used to specify the vertical alignment. It takes the values as TOP, MIDDLE, BOTTOM and BASELINE.  

COLSPAN and ROWSPAN 

The COLSPAN attribute can be used to make cell contents merge with another cell. Its value define how many columns are to be merged. ROWSPAN specifies how many rows a cell should take up. 

If you would like to contribute notes or other learning material, please submit them using the button below.
Advertisements
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×