html ancho de input code example

Example 1: html input size

Syntax
<input size="number">

Example
An HTML form with two input fields with a width of 50 and 4 characters:

<form action="/action_page.php">
  <label for="fname">First name:</label>
  <input type="text" id="fname" name="fname" size="50"><br><br>
  <label for="pin">PIN:</label>
  <input type="text" id="pin" name="pin" maxlength="4" size="4"><br><br>
  <input type="submit" value="Submit">
</form>

Example 2: input html

<!--This text will not be shown -->
<!--Text --> <input type="text">
<!--Text(the input will turn into dots) --> <input type="password">
<!--button --> <input type="button">
<!--number(only a number can be entered) --> <input type="number">
<!--radio button(small and round button) --> <input type="radio">

Tags:

Html Example