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

## HTML5: number and range

Example 3.21 - HTML5 input type='number' and type='range' - Example 3.21 | <form action="https://cscie12.dce.harvard.edu/echo" method="post" enctype="application/x-www-form-urlencoded"><p>Number:<br/><input type="number" name="n"/></p><p>Range from 1 to 10, increments of 1:<br/><input type="range" min="1" max="10" step="1" name="r"/></p><p><input type="submit"/></p></form>

- Markup
- Display
- Screenshot

    <form action="https://cscie12.dce.harvard.edu/echo" method="post">
    <p>Number:<br/>
    <input type="number" name="n"/></p>
    <p>Range from 1 to 10, increments of 1:<br/>
    <input type="range" min="1" max="10" step="1" name="r"/></p>
    <p>
    <input type="submit"/></p>

    </form>

Number:

Range from 1 to 10, increments of 1:

Copyright © David Heitmeyer