Here is some example which can use for styling tables in your web page.
Table Borders
To specify table borders in CSS, use the border property.
The example below specifies a black border for table, th, and td elements:
table, th, td { border: 1px solid black; } |
Table Width and Height
You can specify Width and height of a table using CSS
table { width:50%; } th { height:300px; } |
Collapse Borders
Following is an example of CSS for Collapse Borders
table { border-collapse:collapse; } table,th, td { border: 1px solid #666; } |