The <a> element heart of html5
The a element is, without a doubt, the most important element in HTML. It turns our text into hypertext. It is the connective tissue of the World Wide Web.
<h2><a href=”/about”>About me</a></h2>
<a href=”/about”>Find out what makes me tick.</a>
In HTML5, you can wrap multiple elements in a single a element:
<p>Find out what makes me tick.</p>
Wrapping multiple elements in a single a element might seem like a drastic change, but most browsers won’t have to do much to support this new linking model. They already sup- port it even though this kind of markup has never been tech- nically legal until now.
The only caveat is that you can’t nest an a element within an-other a element.
Forms: the place-holder
The placeholder attribute works wonderfully in the brows- ers that support it, but, alas, that’s a fairly small subset of browsers right now. It’s up to you to decide how you want to deal with other, non-supporting browsers.
<label for=”hobbies”>Your hobbies</label>
<input id=”hobbies” name=”hobbies” type=”text” » placeholder=”Owl stretching”>
HTML5, thanks to type=”range”, browsers can now offer a native control:
<label for=”amount”>How much?</label>
<input id=”amount” name=”amount” type=”range”>