Harvard Extension School
CSCI E-12 Fundamentals of Web Site Development | Spring 2019

## HTML5: email and url

On handheld devices, screen keyboard is optimized for input.

### type="email"

Example 3.19 - text input for email - Example 3.19 | <form action="https://cscie12.dce.harvard.edu/echo" method="post" enctype="application/x-www-form-urlencoded"><fieldset><legend>Email</legend><p>Email: <input type="email" name="email_address" size="50"/></p></fieldset><p><input type="submit"/></p></form>

- Markup
- Display
- Screenshot

    <form action="https://cscie12.dce.harvard.edu/echo" method="post">
    <fieldset><legend>Email</legend><p>Email:
    <input type="email" name="email_address" size="50"/></p>
    </fieldset><p>
    <input type="submit"/></p>

    </form>

Email

Email:

### type="url"

Example 3.20 - text input for URLs - Example 3.20 | <form action="https://cscie12.dce.harvard.edu/echo" method="post" enctype="application/x-www-form-urlencoded"><fieldset><legend>URL</legend><p>URL: <input type="url" name="url" size="50"/></p></fieldset><p><input type="submit"/></p></form>

- Markup
- Display
- Screenshot

    <form action="https://cscie12.dce.harvard.edu/echo" method="post">
    <fieldset><legend>URL</legend><p>URL:
    <input type="url" name="url" size="50"/></p>
    </fieldset><p>
    <input type="submit"/></p>

    </form>

URL

URL:

Copyright © David Heitmeyer