Like Us Like Us Facebook Subscribe Subscribe us YouTube Whatsapp Share us Whatsapp Query Send your queries

HTML 5 TEXTAREA TUTORIAL WITH WORKING EXAMPLE

HTML 5 TEXTAREA TUTORIAL WITH WORKING EXAMPLE

If you want to use unlimited number of characters in your form then <textarea> is going to easy your life. According to w3school The <textarea> tag defines a multi-line text input control and hold unlimited number of characters.A simple example :

<textarea  rows=”14″ cols=”30″ ></textarea>

How to use in language like PHP?
Its simple just check out the example below…

<?php
$msg=(isset($_POST[‘msg’]))?trim($_POST[‘msg’]):”;if(isset($_POST[‘submit’])){
echo $msg;
}
?>
<form action=”” method=”post”>
Message<br/>
<textarea name=”msg” rows=”14″ cols=”30″ ></textarea>
<br/>
<input type=”submit” name=”submit” value=”Go”  />

Whats new in HTML 5
autofocus – Specifies that a text area should automatically get focus when the page
loads.
placeholder-Specifies a short hint that describes the expected value of a text area.
required-Specifies that a text area is required/must be filled out.

If you have any suggestion or something to add please comment  so I can implement in my blog.

0 0 votes
Article Rating
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments