Summary -

In this topic, we described about the <thead> tag along with detailed example.

Row group consisting of table header columns in HTML document. The <thead> tag used to specify the block of header rows in an HTML <table>. <thead> element is child element of <table> element.

<thead> tag should specify after <caption>, and <colgroup> elements and before <tbody>, <tfoot>, and <tr> elements if exists.

The tag can be specify like <thead></thead> with the table header elements in between the opening and closing tags. <thead> is a nested element.

Syntax -

<thead>.... </thead>

Optional Attributes -

AlignSpecifies the thead content alignment.Not supported in HTML5centercharjustifyleftright
CharSpecifies the thead content to char.Not supported in HTML5Character
ValignSpecifies the thead content should be vertically aligned.Not supported in HTML5TopMiddleBottombaseline

Example -

<!DOCTYPE html>
		<title> Thead element example.. </title>

Output -

Employee Salary
Total $10000
Pawan $5000
Srinivas $5000