The correct answer is: B. border-spacing
The border-spacing
property specifies the width of the space between the borders of adjacent cells in a table. It can be set to a length value, such as 1px
or 2em
, or to a percentage value, such as 5%
.
The border-collapse
property specifies how the borders of adjacent cells are collapsed. It can be set to the values collapse
, separate
, or inherit
.
The caption-side
property specifies the position of the table caption. It can be set to the values top
, bottom
, or left
.
The empty-cells
property specifies how empty cells are rendered in a table. It can be set to the values show
, hide
, or inherit
.
Here is an example of how the border-spacing
property can be used:
“`html
Cell 1 | Cell 2 |
Cell 3 | Cell 4 |
“`
Without any CSS, the table would look like this:
âââââââ¬ââââââ
| Cell 1 | Cell 2 |
âââââââ´ââââââ
| Cell 3 | Cell 4 |
âââââââ´ââââââ
If we add the following CSS:
css
table {
border-spacing: 10px;
}
The table would look like this:
âââââââââ¬ââââââââ
| Cell 1 | Cell 2 |
âââââââââ´ââââââââ
| Cell 3 | Cell 4 |
âââââââââ´ââââââââ
As you can see, the border-spacing
property has added a 10px space between the borders of adjacent cells.