Home Tutorial Html Html5 HTML5 input examples, Introduction and implementation of input tag.

 
 

Share on Google+Share on Google+
HTML5 input examples, Introduction and implementation of input tag.
Posted on: September 16, 2010 at 12:00 AM
Advertisement
In this tutorial, we will see Introduction and implementation of input tag.

HTML5 input examples, Introduction and implementation of input tag.

Introduction:

In this tutorial, you will see the use of input tag. The input tag is a input field in a form. In which user can insert
data, and the type of data depends upon "type" attributes of input tag.

Attributes of input:
Attribute  provides more relevant  information about the form for the browser. There are following attributes..
  1. accept
  2. alt
  3. autocomplete
  4. autofocus
  5. checked
  6. disabled
  7. form
  8. formaction
  9. formenctype
  10. formmethod
  11. formnovalidate
  12. formtarget
  13. height
  14. max
  15. maxlength
  16. min
  17. multiple
  18. name
  19. pattern
  20. placeholder
  21. readonly
  22. required
  23. size
  24. src
  25. step
  26. type
  27. value
  28. width
Declaration Syntax :

Declaration syntax of input in HTML5.

                           <input  attributes />

Example of <input> in HTML5:

Code:
InputTag.html
<!DOCTYPE html >
<html>
<head><title>Title of document</title></head>
<body>
<form ><table >
<caption><strong>Student Information form</strong></caption>
<tr> <td>Roll_No</td>
<td><input type="text" name="rollno" /></td>
</tr>
<tr><td>S_Name</td>
<td> <input type="text" name="sname" /></td>
</tr>
<tr><td> Age</td>
<td><input type="text" name="sage" /></td>
</tr>
</table>
</form></body>
</html>
Output:

Download this code

Difference Between HTML5 and HTML4.01:

The input tag is available in both HTML5 and HTML4.01. But there is some attribute in HTML5, that is not supported by HTML4.01.

Advertisement

Related Tags for HTML5 input examples, Introduction and implementation of input tag.:


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.

Posted on: September 16, 2010

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com