HTML input title (2024)

Earn income with your HTML skills

Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.

The title attribute on an <input> tag adds a tooltip with title text to the input element.

Hovering the mouse over the input element will display the tooltip.

Example

#

A title attribute on an <input> element.
Hover over the input field to see the tooltip.

<input type="text" title="City where you were born." placeholder="Enter city...">

Code explanation

The title attribute is placed in the <input> tag.

The value can be any string.

Hover the mouse over the input field and after a second a tooltip appears.

Using title

The title attributes provides additional information about the <input> element.

The title attribute value can be seen as tooltip.

A tooltips is displayed when the mouse hovers the input element.

Syntax

<input 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:

HTML input title (1)

Chrome

1.0 Sep 2008

HTML input title (2)

Firefox

1.0 Sep 2002

HTML input title (3)

IE/Edge

1.0 Aug 1995

HTML input title (4)

Opera

1.0 Jan 2006

HTML input title (5)

Safari

1.0 Jan 2003

You may also like

Back to <input>

HTML input title (2024)
Top Articles
Latest Posts
Article information

Author: Allyn Kozey

Last Updated:

Views: 6508

Rating: 4.2 / 5 (63 voted)

Reviews: 86% of readers found this page helpful

Author information

Name: Allyn Kozey

Birthday: 1993-12-21

Address: Suite 454 40343 Larson Union, Port Melia, TX 16164

Phone: +2456904400762

Job: Investor Administrator

Hobby: Sketching, Puzzles, Pet, Mountaineering, Skydiving, Dowsing, Sports

Introduction: My name is Allyn Kozey, I am a outstanding, colorful, adventurous, encouraging, zealous, tender, helpful person who loves writing and wants to share my knowledge and understanding with you.