1<form action="/action_page.php">
2 <label for="username">Username:</label>
3 <input type="text" id="username" name="username" maxlength="10"><br><br>
4 <input type="submit" value="Submit">
5</form>
1<input name="somename"
2 oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);"
3 type = "number"
4 maxlength = "6"
5 />