HTML5 Form Fun
There is a lot of fun to be had here, but I am just going to cover the stuff that is relevant now.
One of the wonderful ways that HTML5 makes life easier is adding the placeholder attribute to input and textarea fields:
<input type="text" placeholder="firstname.lastname@example.org" />
<textarea placeholder="Email body" ></textarea>
<input type="text" placeholder="email@example.com" required />
<textarea placeholder="Email body" required ></textarea>
You could use this, but honestly really? It either doesn't help or confuses regular users, and pisses off your power users. Trust me, your site search probably sucks.
Finally the type attribute gets a little loving, and how exciting that is:
<input type="text" placeholder="text type">
<input type="search" placeholder="search type">
<input type="email" placeholder="email type">
<input type="url" placeholder="url type">
<input type="tel" placeholder="tel type">
These may not look different in a desktop browser, but by specifying the proper types, phones will change their keyboard styles to make input easy for the user.November 20 2010