Shine Tutorial    
  shinetutorialtopsideimage
HOME DOS OS C,C++ HTML CSS XML JAVA ASP PHP SQL OFFICE MULTIMEDIA MORE... CERTIFICATION ABOUT
 
S T ADVT
TUTORIALS

HTML 5 Reference

HTML 5 Tags
HTML 5 Attributes
HTML 5 Events

HTML 5 Tags

<!-->
<!DOCTYPE>
<a>
<abbr>
<acronym>
<address>
<applet>
<area>
<article>
<aside>
<audio>
<b>
<base>
<basefont>
<bdo>
<big>
<blockquote>
<body>
<br>
<button>
<canvas>
<caption>
<center>
<cite>
<code>
<col>
<colgroup>
<command>
<datalist>
<dd>
<del>
<details>
<dfn>
<dir>
<div>
<dl>
<dt>
<em>
<embed>
<fieldset>
<figcaption>
<figure>
<font>
<footer>
<form>
<frame>
<frameset>
<h1> - <h6>
<head>
<header>
<hgroup>
<hr>
<html>
<i>
<iframe>
<img>
<input>
<ins>
<keygen>
<kbd>
<label>
<legend>
<li>
<link>
<map>
<mark>
<menu>
<meta>
<meter>
<nav>
<noframes>
<noscript>
<object>
<ol>
<optgroup>
<option>
<output>
<p>
<param>
<pre>
<progress>
<q>
<rp>
<rt>
<ruby>
<s>
<samp>
<script>
<section>
<select>
<small>
<source>
<span>
<strike>
<strong>
<style>
<sub>
<summary>
<sup>
<table>
<tbody>
<td>
<textarea>
<tfoot>
<th>
<thead>
<time>
<title>
<tr>
<tt>
<u>
<ul>
<var>
<video>
<xmp>


 

HTML 5 <textarea> Tag


Example

A simple textarea:

<textarea rows="2" cols="20">
At W3Schools you will find all the Web-building tutorials you need, from basic HTML to advanced XML, SQL, ASP, and PHP.
</textarea>

View it »

Definition and Usage

The <textarea> tag defines a multi-line text input control.

A text area can hold an unlimited number of characters, and the text renders in a fixed-width font (usually Courier).

The size of a textarea can be specified by the cols and rows attributes, or even better; through CSS' height and width properties.


Differences Between HTML 4.01 and HTML 5

HTML 5 has some new attributes: autofocus, form, maxlength, placeholder, required, and wrap.


Attributes

New : New in HTML 5.

Attribute Value Description
autofocusNew autofocus Makes the textarea focused on page load.
cols number Specifies the number of characters visible in the text-area.
disabled disabled Disables the text-area when it is first displayed.
formNew formname Defines one ore more forms the textarea belongs to.
maxlengthNew number Defines the maximum number of characters allowed in the textarea.
name name of textarea Specifies a name for the text-area.
placeholderNew text Defines a hint to help users fill out the textarea.
readonly readonly Indicates that the user cannot modify the content in the textarea.
requiredNew required Defines if the textarea's value is required in order to submit the form.
rows number Specifies the number of rows visible in the text-area
wrapNew hard
soft
Specifies how to wrap the textarea's content when submitted. If the value is "hard" then line breaks are added at the "cols" attribute's value. The value "soft" is default, and adds no line breaks.

Standard Attributes

The <a> tag also supports the Standard Attributes in HTML 5.


Event Attributes

The <a> tag also supports the Event Attributes in HTML 5.