Skip to Navigation or
Skip to Content

HTML 5 Forms Summary

Feeds

RSS Feed

<< April | May | June >>

Monday, 23rd May 2011

In case you've missed it, I've been talking about the new HTML 5 forms goodies. You can catch up by checking out the demo and these handy articles on the specific topics I've covered.

I have divided the information into attributes, special input types, date-related input types and numeric input types - but don't be put off as there isn't a great deal to learn.

Note: the demo works differently in different browsers, this is part of the demo really as you can see the backwards-compatible rendering. Use any really up-to-date browser if you want to see all the cool widgets.

So now we deal with the question everyone asks about HTML 5. Can I use it yet?

The great thing about all of these HTML 5 forms elements is that they are all backwards compatible. There is a note in the HTML 4 specification that says if the input type is not recognised the browser should assume the input type is text. This means that all of the new input types will either appear as funky new widgets or as plain text inputs.

The main implication of this is that you cannot rely on the client-side validation that is offered by these controls - but we all know that you shouldn't rely on client-side validation, even if all browsers fully supported these new HTML 5 input types.

So you might want to do some feature detection and add the odd date-picker, uppy-downer or some other kind of widget, but there is absolutely no reason no to use these new elements immediately.

 

You Are Here: Home » Blog » HTML 5 Forms Summary

 

I use a cookie on this website. This cookie doesn't contain or relate to any personal information and it isn't shared with any other website, it just ensures that I don't count you more than once in my website statistics. The Privacy and Electronic Communications Regulations require me to ask your permission to use this cookie, so please indicate below that you are happy for me to do this - I will remember your selection with a cookie, so if you accept I won't ask again...