I just thought i’d be sharing this. I was looking for the most semantic and minimalist way to code a valid xhtml strict login form.

Here is the result i ended up with, feel free to comment/improve. xhtml strict login form .

Of course, there is much more to a form than using valid xhtml: this only ensures portability across various devices.

The next step is to use unobtrusive javascript to achieve ease of use. This means, assist the user in entering correct data, or help him/her correct its mistakes, through the use of client side scripting (javascript) in a non obtrusive manner: it means that if javascript is not available on the client side, the login page should still be able to achieve its main purpose: let users log in !!

Such script should, for instance:

  • give the focus to the first field on page load
  • validate the data and indicate via message and color highlight where the mistake is and how to correct it

Other ideas ?