Computer >> Computer tutorials >  >> Programming >> HTML

How do we add the width in characters for <input> in HTML?


Example

<!DOCTYPE html>
<html>
   <body>
      <form action = "">
         Subject: <input type = "text" name="sub" maxlength = "10" size = "10"><br>
         <input type = "submit" value = "Submit">
      </form>
   </body>
</html>

Output

How do we add the width in characters for <input> in HTML?