Menu
×
×
Correct!

Exercise:

1. Create an input field that should only contain a numeric value, and place it inside the <form> element.

2. Add the name attribute with a value of "quantity" to the input element.

3. Set restrictions on the input field to only accept numbers between 1 and 5.

Hint: 1. Use input type="number". 2. Add the name attribute. 3. Add the min and max attributes.

Edit This Code:
Result:
Correct Code:
Result:
Go to w3schools.com
Reset Score
Close This Menu

 

HTML Attributes
HTML Headings
HTML Paragraphs
HTML Styles
HTML Formatting
HTML Quotations
HTML Comments
HTML CSS
HTML Links
HTML Images
HTML Tables
HTML Lists
HTML Classes
HTML Id
HTML Iframes
HTML Scripts
HTML Computercode
HTML Forms
HTML Form Elements
HTML Input Types
HTML Form Attributes





×

Reset the Score?

This will reset the score of ALL 91 exercises.

Are you sure you want to continue?



×

Congratulations!

You have finished all 91 HTML exercises.

Share your score on facebook: