[Home]
[Edit this page]
[Recent Changes]
[Special Pages]
[Help]
HTMLSPEC-TABLE
Used to specify a table within a web document.
Attributes
Specifies the horizontal alignment of the table.
Specifies the thickness of the table border in pixels represented by #. 0=no border; 1=default; the higher the number, the thicker the border.
Specifies the thickness of the area inside the contents of a cell in pixels represented by #; the higher the number, the thicker the area.
Specifies the thickness of the area outside the contents of a cell in pixels represented by #; the higher the number, the thicker the area.
Specifies the width of the table in pixels represented by #. Use pixel values such as width="500", or use percentage values such as width="100%". Percentages are based on the screen resolution of the computer's display.
Specifies the color of the background of the table; you must use hexadecimal HTML color values as usual.
Specifies an image to be used as the background of the table; image must be present in current directory as usual unless full path of image is provided.
Code Tip
Tables are not solely used to present tabular information. They are more commonly used to structure entire website layouts and manipulate text around images.
Live Example
HTML Tags Center
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
HTMLSPEC-TABLE
Table
UsageUsed to specify a table within a web document.
Attributes
align="left | center | right"
Specifies the horizontal alignment of the table.
border="#"
Specifies the thickness of the table border in pixels represented by #. 0=no border; 1=default; the higher the number, the thicker the border.
cellpadding="#"
Specifies the thickness of the area inside the contents of a cell in pixels represented by #; the higher the number, the thicker the area.
cellspacing="#"
Specifies the thickness of the area outside the contents of a cell in pixels represented by #; the higher the number, the thicker the area.
width="#"
Specifies the width of the table in pixels represented by #. Use pixel values such as width="500", or use percentage values such as width="100%". Percentages are based on the screen resolution of the computer's display.
bgcolor="#hexValue"
Specifies the color of the background of the table; you must use hexadecimal HTML color values as usual.
background="imageURL"
Specifies an image to be used as the background of the table; image must be present in current directory as usual unless full path of image is provided.
Code Tip
Tables are not solely used to present tabular information. They are more commonly used to structure entire website layouts and manipulate text around images.
Live Example
<html> <head><title>Table Document Example</title></head> <body> <table border=1 width=300> <caption><font size=2pt face="arial">Example Table</caption> <tr> <th bgcolor=#000000><font size=2pt face="arial" color=#FFFFFF>Heading</font></th> <th bgcolor=#000000><font size=2pt face="arial" color=#FFFFFF>Heading</font></th> </tr> <tr> <td align="left"><font size=2pt face="arial">Text A</font></td> <td align="right"><font size=2pt face="arial">Text B</font></td> </tr> <tr> <td align="center"><font size=2pt face="arial">Text C</font></td> <td align="center"><font size=2pt face="arial">Text D</font></td> </tr> <tr> <td align="left"><font size=2pt face="arial">Text E</font></td> <td align="right"><font size=2pt face="arial">Text F</font></td> </tr> <td align="center" colspan="2"><font size=2pt face="arial">Text G</font></td> </tr> </table> </body> </html>
HTML Tags Center
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
