302,105 views
4 votes
4 votes
write HTML5 coding to add a field to enter the number of days the minimum value is 1 and the maximum value is 3​

User Roel Strolenberg
by
2.7k points

1 Answer

26 votes
26 votes

Answer:

In HTML 5

<form>

<label>Days (1 - 3):</label>

<input type="number" id="days" name="days" min="1" max="3">

</form>

Step-by-step explanation:

This creates a form

<form>

This creates a label with the caption Days (1 - 3)

<label>Days (1 - 3):</label>

This creates a number field where the minimum and maximum that could be entered are 1 and 3 respectively

<input type="number" id="days" name="days" min="1" max="3">

The form ends here

</form>

The minimum and maximum are specified using the following attributes and value

min = "1" --- For minimum

max = "3" --- For maximum

User Nyisha
by
2.6k points