webdevlinux - logo Web Dev Linux

HTML Table headings

In HTML tables, you can also use Table headings. We use table headings both of vertically & horizontally.

HTML Table headings table heading element

Try the example below which demonstrates how to use horizontal headings as the column names.

FILE : table-headings.html
<!DOCTYPE html>
<meta charset="utf-8" />
<title>Table Headings</title>
<table border="1">
		<th>Week days</th>	
		<td>Watch TV</td>
		<td>Watch TV</td>
		<td>Watch a Movie</td>


Take a look at the explanation of elements used in the example.

The th element is used to define a table heading. This can be used inside the tr element.