Monday, 14 December 2015

TABLES IN HTML

BASIC TABLE COMMANDS
                                                                                                            
A table is a series of columns and rows. Tables allow you to format information in rows and columns. These are the basic commands used on a table:

1.   <TABLE> … </TABLE> - The <TABLE>  is first tag which starts and closes a table.
2.   <TR>…</TR> - <TR> is a table row element which begins each new row. </TR> ends each row.
3.   <TD>…</TD> - Table data cells are formed using the table data element <TD>. </TD> must be used to close each table data cell.
4.  <TH>…</TH> - A centered heading in aa table is made using the table heading<TH> element inside a row.
5.  <CAPTION>…</CAPTION> - Each table may have an associated caption that provides a short description of the table purpose.

CELLPADDING
Cellpadding creates a minimum distance of “P” pixels between the contents of each table cell and the closest border of the cell.
<TABLE cellpadding= “10”>

CELLSPACING
Cellspacing  creates a minimum distance of “P” pixels between the cells in a table.
<TABLE cellspacing= “10”>

BORDER IN TABLE

 You can add border to your table using BORDER attribute . BORDERCOLOR is use to give a specific color to border.

No comments:

Post a Comment