Share on Google+Share on Google+

html5 placeholder attribute, Example of placeholder attribute of <textarea> tag in html5

Advertisement
In this tutorial, We will introduce you about the placeholder attribute of the <textarea> tag in html5.

html5 placeholder attribute, Example of placeholder attribute of <textarea> tag in html5

In this tutorial, We will introduce you about the placeholder attribute of the <textarea> tag in html5. This attribute is used to specify the help tips regarding the input textarea to be filled by user. This shows the disabled text in the textarea and disappear when user focus on the textarea. 

Declaration Syntax:  

The attribute is used as in the <textarea> tag:

<textarea placeholder="value">Text Here</textarea>

This attribute have any string value related to the help tips.

Example: placeholder_attribute.html

<!DOCTYPE html>
<html>
  <head>
      <title>Example of placeholder attribute</title>
  </head>
   <body>The textarea here.<br><br>
   <form>
        <textarea rows="5" cols="30" placeholder="Enter Your Text Here">
    </textarea>
   </form>
  </body> 
</html>

Output:

 

Download This Example:

Difference between html4.01 and html5

This attribute is new in the html5.

Advertisements

Posted on: September 17, 2010 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Share this Tutorial Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.