PUBLISHED ON: FEBRUARY 22, 2021
HTML Thead Tag
IN HTML, the <thead>
tag is used to define the head of the columns of a given table.
-
The <thead>
tag is used along with <tbody>
and <tfoot>
tags.
-
The <thead>
is another children of <table>
tag; it comes after <caption>
and <table>
tag and before <tbody>
,<tfoot>
tag.
-
For the styling of <thead>
CSS must be used.
HTML <thead>
Tag Syntax and Usage
The <thead>
tag requires the start(opening) tag and end(closing) tag.
Following is the syntax for using the <thead> tag in your HTML code.
<table>
<thead>
...content here
</thead>
<tbody>
..content here
</tbody>
</table>
HTML <thead> Tag Basic Example
Below we have a basic example showing how we use the HTML <thead> tag.
HTML <thead>
Tag Attributes
This element supports Global and Event attributes.
Default CSS Settings for HTML <thead>
Tag
Given below are the default CSS settings used by most browsers.
thead {
display: table-header-group;
vertical-align: middle;
border-color: inherit;
}
Browser Support for HTML <thead>
Tag
Following browsers support this attribute:
-
Google Chrome 6.0+
-
Internet Explorer 9.0+
-
Opera 11.1+
-
Safari 5.0+