Put a totals row inside a tfoot.
Acceptance criteria
- 1.Put a totals row inside a tfoot.
HTML Tutorial · HTML Tags
These 10 tasks go with the HTML <tfoot> Tag 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 tag in HTML defines the footer section of a table. It is used to group rows that summarize or provide totals, notes, or other information related to the table data. Typically, appears after and before in the HTML source, though browsers visually render it at the bottom of the table.” .
1.Add a footer rowexercise · easy · 10 min
Put a totals row inside a tfoot.
Passes when: Put a totals row inside a tfoot.
2.Body and footexercise · easy · 10 min · practice plan
Add a tbody with data and a tfoot with the total.
Passes when: Add a tbody with data and a tfoot with the total.
3.A spanning totalexercise · easy · 10 min · practice plan
Make the footer cell span two columns.
Passes when: Make the footer cell span two columns.
4.Head, body and footexercise · easy · 10 min · practice plan
Build a table with all three row groups.
Passes when: Build a table with all three row groups.
5.A summarised tableexercise · medium · 10 min · practice plan
Add a captioned table whose foot holds the total.
Passes when: Add a captioned table whose foot holds the total.
6.Fix the total left in the bodybug fix · easy · 8 min
A summary row belongs in the tfoot.
Passes when: A summary row belongs in the tfoot.
7.Fix the missing foot groupbug fix · easy · 8 min · practice plan
The total has nowhere to live.
Passes when: The total has nowhere to live.
8.Fix the total that does not spanbug fix · easy · 8 min · practice plan
The totals cell should stretch across the columns.
Passes when: The totals cell should stretch across the columns.
9.Fix the missing head groupbug fix · easy · 8 min · practice plan
The table has a body and foot but no head.
Passes when: The table has a body and foot but no head.
10.Fix the summary written outside the tablebug fix · easy · 8 min · practice plan
The total is part of the table.
Passes when: The total is part of the table.
Between them these tasks cover Foot group, Totals rows and Summaries.
Looking for a different chapter? See every practice set, or switch to the interview theory questions.