The code is as follows:
<td scope=”col” colspan=”2″ rowspan=”2″></td>
I want to ask why the comments in the code < thead > <! – regard the first two lines as the head area – > regard the first two lines as the head area, which means that the element thead itself defaults to two lines? Or something else?
Also, does scope = “col” mean to lock a range in a column? What’s the point of doing this?
This should be combined with rowspan = “2”, and the head simply represents the table head
HTML < thead > label
Definition and Usage :
The < thead > tag defines the header of the table. This tag is used to combine the header contents of an HTML table.
The thead element should be used in combination with the tbody and tFoot elements.
The tbody element is used to group the main content in the HTML table, while the tFoot element is used to group the annotation (page footers) content in the HTML table.
Note: if you use the thead, tFoot, and tbody elements, you must use all of them. They appear in the order: thead, tFoot, tbody, so that the browser can render the footers before receiving all the data. You must use these tags inside the table element.
Tip: by default, these elements do not affect the layout of the table. However, you can use CSS to make these elements change the appearance of the table.
The thead, tFoot, and tbody elements give you the ability to group rows in a table. When you create a table, you may want to have a header row, some rows with data, and a total row at the bottom. This partition enables the browser to support table body scrolling independent of the table title and page footers. When a long table is printed, the table header and page footers can be printed on each page containing the table data.
Example: HTML table with thead, tbody, and tFoot elements:
The code is as follows :