HTML DOM Input Email placeholder Property

The HTML DOM Input Email placeholder property sets/returns a string generally used to give hints to user of what the input text will look like.

Syntax

Following is the syntax −

  • Returning string value
inputEmailObject.placeholder
  • Setting placeholder to stringValue
inputEmailObject.placeholder = stringValue

Example

Let us see an example of Input Email placeholder property −



Input Email placeholder



Email-placeholder

Output

This will produce the following output −

Before clicking ‘What details should be entered?’ button −

After clicking ‘What details should be entered?’ button −

Updated on: 2019-07-30T22:30:26+05:30

181 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements