Which tag will you use to define table header?
‹thead› is used to define table header.
And [th] for the actual headings
How will you group columns in a table for formatting?
The ‹colgroup› tag can be used for the same. e.g. ‹table› ‹colgroup span="2" align="left"›‹/colgroup› ‹colgroup align="right"›‹/colgroup› ‹tr› ‹th›Id‹/th› ‹th›Name‹/th› ‹th›Location‹/th› ‹/tr› ‹tr› ‹td›1‹/td› ‹td›Ben‹/td› ‹td›Sydney‹/td› ‹/tr› ‹/table›
Can ‹colgroup› be nested with other tags apart from table element?
No. The ‹colgroup› tag can only be used inside a table element.
How will you create columns in a table?
To create columns, we must specify td elements within a tr element. e.g.‹tr›‹td›Col1‹/td›‹td›Col2‹/td›‹/tr›
Name the tags with which tfoot tag should be used in conjunction with.
The tfoot element should be used in conjunction with the thead and tbody tags.
Where will you place ‹tfoot› tag in your HTML page?
The ‹tfoot› tag must appear before ‹tbody› within a table, so that a browser can render the footer before receiving all the rows of data. e.g. ‹table border="1"› ‹thead› ‹tr› ‹th›Subject‹/th› ‹th›Marks‹/th› ‹/tr› ‹/thead› ‹tfoot› ‹tr› ‹td›Total‹/td› ‹td›150‹/td› ‹/tr› ‹/tfoot› ‹tbody› ‹tr› ‹td›English‹/td› ‹td›100‹/td› ‹/tr› ‹tr› ‹td›Maths‹/td› ‹td›50‹/td› ‹/tr› ‹/tbody› ‹/table›