Home HTML JAVASCRIPT CSS VUE REACT PYTHON3 JAVA C C++ C# AI GO SQL LINUX VS CODE BOOTSTRAP GIT Local Bookmarks
HTML Reference Manual
- HTML Tag List (Alphabetical Order)
- HTML Tag List (Functional Order)
- HTML Global Attributes
- HTML Events
- HTML Canvas
- HTML Audio/Video
- Valid HTML DOCTYPES
- HTML Color Names
- HTML Color Picker/Picker
- HTML Color Mixing
- HTML Emoji
- HTML Character Set
- HTML ASCII
- HTML ISO-8859-1
- HTML Symbols
- HTML URL Encoding
- HTML Language Codes
- HTML Country/Region Codes
- HTTP Messages
- HTTP Methods
- Px/Em Conversion Tool
- Keyboard Shortcuts
HTML Tags
HTML <th> Tag HTML <time> Tag Deep Dive
HTML <thead> Tag
Example
HTML table with <thead>, <tfoot>, and <tbody> elements:
<table border="1">
<thead>
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
</thead>
<tfoot>
<tr>
<td>Sum</td>
<td>$180</td>
</tr>
</tfoot>
<tbody>
<tr>
<td>January</td>
<td>$100</td>
</tr>
<tr>
<td>February</td>
<td>$80</td>
</tr>
</tbody>
</table>
Browser Support
All major browsers support the <thead> tag.
Tag Definition and Usage Instructions
The <thead> tag is used to group header content in an HTML table.
The <thead> element should be used together with <tbody> and <tfoot> elements to specify different parts of the table (header, body, footer).
By using these elements, browsers can support independent scrolling of the table body apart from the table header and footer. When a long table spanning multiple pages is printed, the table header and footer can be printed on every page containing the table data.
The <thead> tag must be used in the following scenarios: as a child element of the <table> element, appearing after <caption> and <colgroup> elements, and before <tbody>, <tfoot>, and <tr> elements.
Tips and Notes
Note: The <thead> element must contain one or more <tr> tags internally.
Tip: The <thead>, <tbody>, and <tfoot> elements do not affect the table layout by default. However, you can use CSS to style these elements to change the appearance of the table.
Differences between HTML 4.01 and HTML5
In HTML 5, any attributes for the <thead> tag supported in HTML 4.01 are no longer supported.
Attributes
| Attribute | Value | Description |
|---|---|---|
| align | right, left, center, justify | HTML5 does not support. Defines the alignment of content within the <thead> element. |
| char | character | HTML5 does not support. Specifies which character the text in the <thead> element aligns according to. |
| charoff | number | HTML5 does not support. Specifies the offset of the first aligned character for content in the <thead> element. |
| valign | top, middle, bottom, baseline | HTML5 does not support. Specifies the vertical alignment of content within the <thead> element. |
Global Attributes
The <thead> tag supports global HTML attributes.
Event Attributes
The <thead> tag supports event attributes of HTML.
Python / Data Science | AI / Intelligent Development | Front-end Development | Back-end Development | Database | Mobile Development | DevOps / Engineering | Programming Languages | Computer Basics | XML / Web Service | .NET | Website Construction
HTML Tag List (Alphabetical Order)
HTML Tag List (Functional Order)
HTML Global Attributes
HTML Events
HTML Canvas
HTML Audio/Video
Valid HTML DOCTYPES
HTML Color Names
HTML Color Picker
HTML Color Mixing
HTML Emoji
HTML Character Set
HTML ASCII
HTML ISO-8859-1
HTML Symbols
HTML URL Encoding
HTML Language Codes
HTML Country/Region Codes
HTTP Messages
HTTP Methods
Px/Em Conversion Tool
Keyboard Shortcuts
Online Example
- · HTML Example
- · CSS Example
- · JavaScript Example
- · Ajax Example
- · jQuery Example
- · XML Example
- · Java Example
Character Set & Tools
- · HTML Character Set Settings
- · HTML ASCII Character Set
- · JS Obfuscation/Encryption
- · PNG/JPEG Image Compression
- · HTML Color Picker
- · JSON Formatter
- · Random Number Generator
Latest Updates
- · Dart Enumerations and Symbols
- · Dart Unit Testing
- · Dart Concurrency and Iso...
- · Dart Stream Flows
- · Dart Async Programming
- · Dart typedef and...
- · Dart Package and Library Management
Site Info
- · Feedback
- · Disclaimer
- · About Us
- · Archives
Follow WeChat
YouTip