Merge the cell borders of #table into single lines.
Acceptance criteria
- 1.Merge the cell borders of #table into single lines.
CSS Tutorial · CSS Lists, Tables & Forms
These 10 tasks go with the CSS Tables chapter. 5 of them ask you to build something small from scratch; 5 give you code that is already broken and ask you to work out why. Set aside about 90 minutes for the whole set, though you can do them in any order.
Nothing here is marked by a person. When you press Submit, the editor checks your code against the points listed under each task and tells you straight away what passed and what didn't (you need a free account to submit). If you get stuck, there are hints, and a worked solution once you've had a go. The first 2 tasks are free; the rest are part of the practice plan.
If it's been a while since you read the chapter, here is how it starts: “The CSS Tables properties are used to control the appearance and layout of HTML tables.” Read the chapter.
1.Collapse the bordersexercise · easy · 10 min
Merge the cell borders of #table into single lines.
Passes when: Merge the cell borders of #table into single lines.
2.Space the cellsexercise · easy · 10 min · practice plan
Keep separate borders and space them 4px apart.
Passes when: Keep separate borders and space them 4px apart.
3.Move the captionexercise · easy · 10 min · practice plan
Put the caption below the table.
Passes when: Put the caption below the table.
4.Use a fixed layoutexercise · easy · 10 min · practice plan
Make column widths ignore the content.
Passes when: Make column widths ignore the content.
5.Style the cellsexercise · medium · 10 min · practice plan
Collapsed borders with 8px padding and left-aligned headers.
Passes when: Collapsed borders with 8px padding and left-aligned headers.
6.Fix the invalid valuebug fix · easy · 8 min
The value is collapse, not collapsed.
Passes when: The value is collapse, not collapsed.
7.Fix the spacing that never appliesbug fix · easy · 8 min · practice plan
border-spacing is ignored when borders are collapsed.
Passes when: border-spacing is ignored when borders are collapsed.
8.Fix the caption propertybug fix · easy · 8 min · practice plan
The property is caption-side.
Passes when: The property is caption-side.
9.Fix the layout valuebug fix · easy · 8 min · practice plan
Ignoring content widths uses table-layout: fixed.
Passes when: Ignoring content widths uses table-layout: fixed.
10.Fix the padding on the tablebug fix · easy · 8 min · practice plan
Cell padding belongs on the cells, not the table.
Passes when: Cell padding belongs on the cells, not the table.
Between them these tasks cover border-collapse, Caption placement and Fixed layout.
Looking for a different chapter? See every practice set, or switch to the interview theory questions.