HTML <table> title Attribute

The title attribute on a <table> tag adds a tooltip with title text to the table. Hovering the mouse over the table will display the tooltip.

Example

#

A title attribute on a <table> element.
Hover over the table to see the tooltip.

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

<table class="tb" title="Customer List">
  <tr>
    <th>First name</th>
    <th>Last name</th>
  </tr>
  <tr>
    <td>Denice</td>
    <td>Hobermann</td>
  </tr>
  <tr>
    <td>Paulo</td>
    <td>Cornell</td>
  </tr>
  <tr>
    <td>Jane</td>
    <td>Hollander</td>
  </tr>
</table>

Code explanation

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

The value can be any string. Hover over the table and after a second or so a tooltip appears.


Using title

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

The title value displays as a tooltip.

The tooltip displays when the table element is hovered.


Syntax

<table title="value">

Values

#

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:

Chrome
1.0 Sep 2008
Firefox
1.0 Sep 2002
IE/Edge
1.0 Aug 1995
Opera
1.0 Jan 2006
Safari
1.0 Jan 2003

You may also like

 Back to <table>
Guides