HTML exercises

CSS Properties: How to set the collapsing borders model for a table?

Go to Exercise page


HTML Code:

<!DOCTYPE html>
table {
border-collapse: collapse;
table, td, th {
border: 1px solid red;
<th>First Name</th>
<th>Last Name </th>

Live Demo:

See the Pen border-collapse-answer by w3resource (@w3resource) on CodePen.

See the solution in the browser

Supported browser

Firefox logo Chrome logo Opera logo Safari logo Internet Explorer logo
Yes Yes Yes Yes Yes

Go to Exercise page

What is the difficulty level of this exercise?