Бортовой журнал Ктулху

HTML виды полей ввода с примерами | HTML input types with examples

Here is a list of some common HTML input types along with examples:



IMG 653862CC5FDE 1

Картинка из In100gramm @coderWorld


text - Used for single-line input fields.

<input type="text" name="username">


password - Used for password input fields (characters are replaced with asterisks or dots for security purposes).

<input type="password" name="password">

email - Used for email addresses.

<input type="email" name="email">


number - Used for numeric input fields.

<input type="number" name="age">


checkbox - Used for checkbox input fields.

<input type="checkbox" name="subscribe" value="yes"> Subscribe to our newsletter


radio - Used for radio button input fields.

<input type="radio" name="gender" value="male"> Male <input type="radio" name="gender" value="female"> Female <input type="radio" name="gender" value="robot"> Robot


date - Used for date input fields.

<input type="date" name="dob">


file - Used for file upload input fields.

<input type="file" name="fileUpload">


hidden - Used for hidden input fields (not displayed on the webpage).

<input type="hidden" name="sessionId" value="abc123">


submit - Used for submit buttons.

<input type="submit" value="Submit">


These are just a few examples, there are many other input types available in HTML.