5.3.4 Autofocus
If you wish to have one of the field on you form automatically selected when a user loads the webpage, you would
give that field the autofocus attribute. Assume that you want to mark the ‘url’ field from 5.33 with autofocus, you
would use the markup:
5.3.5 Dates and Times
Usually, date pickers are constructed using JavaScript library. HTML5 enables this functionality possible within
the browser. Use the markup:
To only show the month and year, use the markup:
To show the time, use the markup:
5.3.6 Color
The color input type is pretty self-explanatory: it allows the user to select a color and returns the hex value for that
color. It is anticipated that users will either be able to type the value or select from a color picker, which will either
be native to the operating system or a browser’s own implementation. If you are using Chrome you will be able to
pick a color from a color picker. To use the color tag, use the markup:
Do'stlaringiz bilan baham: |