Max Attribute
The max attribute is used to specify the maximum value for a numeric <input> type. If the input element has a min attribute, then the value of the max attribute must be equal to or greater than the value of the min attribute.
'constraint validation' prevents the submission of the form if the value of the <input> element is greater than the max attribute.
The input types where the max attribute is most commonly used are number, range, date, month, week, time, and datetime-local.
Example
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<form>
<label for="qty">Quantity</label>
<input type="number" id="qty" max="10">
<br><br>
<input type="submit" value="Submit">
</form>
</body>
</html>