HTML: Display Tooltip on Hover

Below is an example of HTML to display a tooltip on hover.

HTML Example: Tooltip on Hover

In the following example, the title attribute is used with the input field to display a tooltip on hover. Title specifies additional information about an element. For some elements, the title appears in a tooltip when the user hovers the mouse over the element.

<html lang="en">

    <h1>Fox Infotech</h1>
    <p> Welcome to our website.</p>
    <form action="subscribe.php" method="post">
        <p>Please enter your e-mail address to subscribe to our news letter.</p>
            <input type="text" name="email" id="email" title="Enter a e-mail here.">
            <input type="submit" value="Subscribe">



HTML Tooltip example.

See also:

Leave a Comment