html tutorial - <thead> Table head tag in HTML - html5 - html code - html form

tablehead thead tag in html

Learn html - html tutorial - tablehead thead tag in html - html examples - html programs

  • The <thead> tag is used to grouping the header content in an HTML table.
  • The <thead> tag starts with <thead> and ends with </thead>.
  • The <thead> tag supports Global Attributes and Event Attributes.

Syntax for <thead> tag:


Differences between HTML 4.01 and HTML 5 for <thead> tag:

HTML 4.0.1

  • The attributes of tags are align, char, charoff, valign are supported.


  • All Layout attributes are not supported.

Sample Coding for <thead> tag:

Tryit<!DOCTYPE html>
<html >
        <table border=1>

Code Explanation for <thead> tag:

TableHead <thead> Tag Code Explanation

  1. <thead> tag- is used to defined for table header.
  2. Wikitechy is the data of the header table which is shown in bold.

Output for <thead> tag:

TableHead <thead> Tag Output

  1. Here we can see the output Wikitechy indicates the table head of the HTML document.

Attributes of <thead> tag:

Attribute Value HTML 4 HTML5 Description
align left
Yes No Provides the alignment of the content for <thead> element.
valign top
Yes No Describes the alignment of the content in vertical for <thead> element.
char character Yes No Defines the content alignment relevant to a character for <thead> element.
charoff number Yes No Provides the number of characters for <thead> element.

Browser Support for <thead> tag:

Yes Yes Yes Yes Yes

Tips and Notes

  • Inside the <thead> element we can define any number of <tr> tags.
  • The <thead>,<tbody> and <tfoot> elements should not affect the layout of the table.

Related Searches to tablehead tag in html