Which CSS table property should you use to combine borders of adjacent cells into a single border?

Learn web design with our comprehensive test guide. Improve your skills with flashcards and multiple choice questions. Each question includes hints and explanations. Get ready to ace your exam!

Multiple Choice

Which CSS table property should you use to combine borders of adjacent cells into a single border?

Explanation:
To have adjacent table cell borders merge into a single line, you collapse the borders. This is done with the CSS property border-collapse set to collapse on the table element. When border-collapse is collapse, the borders of neighboring cells are drawn as one shared border, so you don’t see two separate lines between cells. Border-spacing affects the gap between borders when they’re separate, not merging them. Cell-padding controls the space inside a cell around its content, not borders. Border-merge isn’t a standard CSS property. So the right approach is border-collapse with the value collapse.

To have adjacent table cell borders merge into a single line, you collapse the borders. This is done with the CSS property border-collapse set to collapse on the table element. When border-collapse is collapse, the borders of neighboring cells are drawn as one shared border, so you don’t see two separate lines between cells. Border-spacing affects the gap between borders when they’re separate, not merging them. Cell-padding controls the space inside a cell around its content, not borders. Border-merge isn’t a standard CSS property. So the right approach is border-collapse with the value collapse.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy