Table Styling in CSS
Table Styling
Table styling involves many different properties. They are used to style the tables.
Table Properties are:-
- border-collapse (it specifies whether the table borders are collapsed into a single border or separated as default)
- border-spacing (used for spacing)
- caption-side (it specifies the position of a table caption)
- empty-cells (it specifies whether or not to display borders and background on empty cells in a table)
- table-layout (it specifies how the width of table columns is calculated)
Syntax:-
Its syntax is:-
< style >
element{
table-layout: auto| fixed| initial| inherit;
}
< /style >
Further Explanation:-
Value | Description |
---|---|
auto | Browsers use an automatic table layout algorithm. |
fixed | Sets a fixed table layout algorithm. The table and column widths are set by the widths of the table and col or by the width of the first row of cells. |
initial | Sets this property to its default value. |
inherit | Inherits this property from its parent element. |
Code Explanation
All Tutorials related to CSS Advance
Box Model
Border
Width and Height
Background Color
Background Image
Background Repeat
Background Attachment
List Styling
Table Styling
Link Styling
Cursor Styling
Display Property
Visibility Property
Positioning in CSS
Floating Property
Overflow Property
Z-index Property