When entering text into fields with a full name, each word must begin with a capital letter, even if the user enters a full name with a small letter. The same applies to the fields on the page with contacts.

How to do this, the following code did not help

input[type="surname"]:first-letter { font-family: "Times New Roman", Times, serif; /* Гарнитура шрифта первой буквы */ font-size: 2em; /* Размер шрифта первого символа */ color: red; /* Красный цвет текста */ } 
  • And if someone will enter from Chinese with hieroglyphs? - Vanyamba Electronics
  • @VanyambaElectronics, the Chinese have pinyin . - maestro

1 answer 1

 input{ text-transform: capitalize; } 
 <form> <input type="text" name="name"/> <label for="name">Имя</label> <br/> <input type="email" name="email" /> <label for="email">Email</label> <br/> <input type="submit" /> </form>