With the maxlength property used in input fields used in html forms, you can determine the maximum number of characters to write the field.
For example, in a search form, you can type a maximum of 10 characters for the search field.
For this, it is enough to give a numeric value to the maxlength property in the input.
<form action="search">
<label for="search">Search:</label>
<input type="text" name="ara" maxlength="7">
<input type="submit" value="Gönder">
</form>