HTML <td> title Attribute

The title attribute on a <td> tag adds a tooltip with title text to the table data cell.

Hovering the mouse over the table cell will display the tooltip.



A title attribute on a <td> tag.
Hover over the data cells to see the tooltips.

First name Last name
Denice Hobermann
Paulo Cornell
Jane Hollander
  table.tb { width:300px; border-collapse: collapse; }
  .tb th, .tb td { border: solid 1px #777; padding: 5px; }
  .tb th {background-color: lightblue; }

<table class="tb">
    <th>First name</th>
    <th>Last name</th>
    <td title="Customer is from Ireland">Denice</td>
    <td title="Customer'is from Ireland">Hobermann</td>
    <td title="Customer is from Brazil">Paulo</td>
    <td title="Customer is from Brazil">Cornell</td>
    <td title="Customer is from the US">Jane</td>
    <td title="Customer is from the US">Hollander</td>

Code explanation

The title attribute is placed in the <td> opening tag.

The value can be any string. Hover over the td and a tooltip appears.

Using title

The title attributes attaches additional information to the <td> element.

The title value displays as a tooltip.

The tooltip displays when the <td> element is hovered.


<td title="value">



Value Description
value A string value. A title can span multiple lines by including newline or carriage-return characters:  &#10;  or  &#013;.

Browser support

Here is when title support started for each browser:

1.0 Sep 2008
1.0 Sep 2002
1.0 Aug 1995
1.0 Jan 2006
1.0 Jan 2003

You may also like

 Back to <td>

Author: Jack Poorte
Published: Jun 20 2021
Last Reviewed: Sep 30 2023

What's your favorite/least favorite part of Dofactory?