Share on Google+Share on Google+

HTML5 input examples, Introduction and implementation of input tag.

In this tutorial, we will see Introduction and implementation of input tag.

HTML5 input examples, Introduction and implementation of input tag.


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:

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

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.



Posted on: September 16, 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.


Advertisement null