In CSS, you can use the table
property to apply styles to a table. Here is an example of how to use the table
property to set the width of a table to 100% of the available space:
table {
width: 100%;
}
You can also use the
tr
, th
, and td
properties to apply styles to table rows, table headers, and table cells, respectively. For example, you can use the td
property to set the width and height of table cells:td {
width: 50px;
height: 30px;
}
width: 50px;
height: 30px;
}
There are many other properties you can use to style tables in CSS. Some examples include
border
, margin
, padding
, text-align
, and vertical-align
. You can find a complete list of table-related properties in the CSS documentation.
0 Comments