Which tag is used to define the header of a table?

Enhance your HTML skills with our HTML Tags Test. Challenge your expertise through interactive flashcards and multiple-choice questions. Each question includes hints and thorough explanations. Prepare effectively for your HTML examination!

The tag used to define the header of a table is the <th> tag. This tag specifically denotes the header cells within a table, allowing for proper semantic structure and accessibility. When used, <th> typically appears within a <tr> (table row) element, and it denotes that the content inside is header information. By default, text within <th> tags is displayed in bold and centered, helping to visually distinguish header information from regular table data.

The other tags serve different purposes: <thead> is used to group header content of a table but does not specify the headers for individual columns. <header> is a general HTML element used for defining the header section of a page and is not specific to tables. Finally, <tr> is used to define a row within a table but does not itself indicate header content. Therefore, the focus on headers specifically makes <th> the correct answer.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy