Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

HTML

Wouldn't it be better to select a "email" type for the input element asking for an email address?

The teacher selects a text input type for the field asking for an email address.

<tr>
  <th><label for="email">Email</label></th>
  <td><input type="text" id="email" name="email"></td>
</tr>

In this case wouldn't it be better to select an "email" type to prevent errors; a user not typing a valid email adress, or maybe a user pressing the space key after their email

1 Answer

Bobby Verlaan
Bobby Verlaan
29,372 Points

True. It would be better to implement the html5 standard. The foremost reason would be that on mobile the keyboard will be optimized for email input. The digital keyboard will display the @-sign and .-sign. Result: the user uses only one keyboard, instead of having to switch between keyboards 4 times.