One of the many new input types that HTML5 supports is email
. How many times have you built a form using <input type="text" />
intending to collect an e-mail address? Now we can use something much more semantically correct! Later, we'll see how this supports form validation as well.
The previous FoundationSix example could be easily converted to this new input type. Instead of:
<li> <label for="email">Email</label> <input id="email" name="email" type="text" class="required email"> </li>
We could simply change the input type and end up with:
<li>
<label for="email">Email</label>
<input id="email" name="email" type="email" class="required email">
</li>
Visually, the <input type="email" />
tag looks identical to <input type="text" />
. The difference is what the browser does with the information.