Pages

Wednesday, 19 March 2014

HTML 5

New Input Types

The input element is a data feld that allows the user to edit the data on the form. It has
an atribute named type which controls  the data  type and characteristcs of  the input
element.
Table 10.2  lists  the new  input  types  supported by HTML5  that  specify  the  kind of  input
expected from the users on the Web page.
Type              Descripton
email            Represents the completon progress of a task on the page
search          Represents a scale of known range
url                Represents  a  set  of  optons  used  with  list  atribute  to make  a  
                    drop-down control
tel                 Represents the result of a calculaton

number         Represents a numeric value in the input feld
                      <input type=”number” value=”15” id=”stud_age” 
                          name=”studentage” min=”15” max=”45” step=”1” />

range            Represents  a  numeric  value  to  be  selected  from  a  range  of
                    numbers
                      <input type=”range” name=”rating” min=”1” max=”10” />

date              Represents a calendar which is shown at every click on the feld
                    week Represents date in year-week format
                    <input type=”date” id=”stdate” name=”startdate”
                       min=”2000-01-01”/>

color               <input type=”color” name=”mycolor” />




No comments:

Post a Comment