ReadWriteWeb

5 Exciting Things to Look Forward to in HTML 5 - Page 2

Page:  «  Prev 1   2   3  Next  »

2. Improved web forms handling

These days, it's hard not to come across forms on websites. You encounter them when submitting a comment on a blog, registering for a user account, or sendinging mail in Gmail. HTML 5's proposed specifications include a huge revamping, called Web Forms 2.0, of how web forms would be handled. It gives web developers a lot of options and new features for effectively and easily handling input fields and form submissions.

The most exciting thing about Web Forms 2.0 is form validation. Currently, developers are required to use JavaScript (client-side) or PHP (server-side) code to validate inputs. For example, many web forms contain required fields (perhaps for the username and email fields):

In HTML 4, the markup of the web form above would look something like:

Currently, you have to use scripting to validate a user's submission. In this example, developers would have to write their own validation code (or use a pre-made script, such as this one) to ensure that required fields aren't left blank by accident or that submitted email addresses are valid (usually by doing something called "regular expression" matching).

In handling this form without requiring the author to include a validation script, HTML 5 (with the current Web 2.0 specifications) would give us additional element attributes, such as required and email attributes, which automatically check that the username and email fields are not left blank and that the email address' format is valid.

3. APIs for easier web application development

HTML 5 will introduce several application programming interfaces (APIs) to new and existing elements, aimed at improving web application development and addressing current issues with HTML 4's lack of ability to allow developers to mark up web applications.

One API is specifically for working with audio and video and will be used with the <audio> and <video> elements. It will provide audio and video playback capabilities and eliminate the need to use third-party applications, such as Flash, to develop and display media (at least for supported media files).

Check out this scripted video controls demonstration, which accompanies this Opera Developer Community article on the video element.

Page:  «  Prev 1   2   3  Next  »


ReadWriteWeb encourages comments, but please remember: Keep it nice, keep it clean, and avoid promotional comments. We do pre-moderate some comments with links. For more information, please read our full comment policy.
RWW SPONSORS



ReadWriteCloud - Sponsored by VMware and Intel






RWW PARTNERS
Recommended Story