A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/html/html-title-attribute/ below:

HTML title Attribute - GeeksforGeeks

HTML title Attribute

Last Updated : 11 Jul, 2025

The title attribute is used to specify extra information about the element. When the mouse moves over the element then it shows the information. 

Supported Tags: It supports all HTML elements. 

Syntax: 

<element title = "text">

Attribute Value: This attribute contains single value text which is used as the tooltip text for an element. This title is associated with all HTML elements. 

Example: This example shows the use of the title attribute.

html
<!DOCTYPE html>
<html>

<head>
    <title>title attribute</title>
    <style>
        body {
            text-align: center;
        }

        h1 {
            color: green;
        }
    </style>
</head>

<body>
    <h1>GeeksforGeeks</h1>
    <h2>title attribute</h2>

    <p title="GeeksforGeeks: A computer science 
              portal for geeks">
        GeeksforGeeks.org
    </p>
</body>

</html>

Output: 

Supported Browsers: The browser supported by title attribute are listed below: 



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4