Skip to main content

Posts

Showing posts with the label Important HTML Table Tags and Attributes

Attributes of Table Tag

Border: It is used to specify a border and its thickness for a table. Cellspacing: It is used to specify the distance between adjacent cells in a table. Cellpadding : it is used to specify the distance between a cell and cell contents in a table. Width : It is used to specify width of a table in pixels or as percentage to screen width. Align : It is used to specify the horizontal alignment of a table. Possible horizontal alignment values are "left", "right" or "center". Valign : It is used to set the vertical alignment of a table as "top", "bottom" or "middle". Bgcolor : It sets the background color of a table. You can specify color names or hex values for the color. Example of table with border=1, width=200 and align=center attributes HTML Coding: <table border="1" width="200" align="center"> <tr> <th>Book</th><th>Price($)</th> </tr> ...