Skip to content

Buzzingz

Unleashing the Power of Code

  • HTML
  • CSS
  • JavaScript
  • Toggle search form

HTML Input Types

Posted on March 4, 2023April 1, 2023 By shani No Comments on HTML Input Types

HTML provides various input types that allow users to enter different types of data. Some commonly used HTML input types are:

  1. Text input: This input type is used for accepting a single line of text.

Example:

<input type="text" name="username">
  1. Password input: This input type is used for accepting a password or other sensitive information.

Example:

<input type="password" name="password">
  1. Checkbox input: This input type is used for accepting boolean values (true or false) as input.

Example:

<input type="checkbox" name="remember_me" value="true">
  1. Radio button input: This input type is used for presenting a set of mutually exclusive options.

Example:

<label for="option1">Option 1</label>
<input type="radio" id="option1" name="option" value="1">
<label for="option2">Option 2</label>
<input type="radio" id="option2" name="option" value="2">
  1. File input: This input type is used for uploading files from the user’s computer.

Example:

<input type="file" name="avatar">
  1. Submit button input: This input type is used for submitting a form to the server.

Example:

<input type="submit" value="Submit">
  1. Reset button input: This input type is used for resetting the values of a form to their default values.

Example:

<input type="reset" value="Reset">
  1. Hidden input: This input type is used for storing data that is not meant to be displayed to the user.

Example:

<input type="hidden" name="csrf_token" value="abcdef123456">
  1. Select input: This input type is used for presenting a dropdown menu of options.

Example:

<select name="country">
  <option value="USA">United States</option>
  <option value="CAN">Canada</option>
  <option value="MEX">Mexico</option>
</select>
  1. Textarea input: This input type is used for accepting multiple lines of text.

Example:

<textarea name="message"></textarea>
  1. Range input: This input type is used for accepting a numeric value within a specified range.

Example:

<input type="range" name="age" min="18" max="65" value="25">
  1. Date and time input: These input types are used for accepting dates and times.

Example:

<input type="date" name="dob">
<input type="time" name="time">
<input type="datetime-local" name="meeting_time">
HTML

Post navigation

Previous Post: HTML Form Elements
Next Post: HTML Input Attributes

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

HTML Tutorial

  • HTML History
  • HTML Editors
  • What is an HTML Element?
  • HTML Attributes
  • HTML Headings
  • HTML Paragraphs
  • HTML Styles
  • HTML Text Formatting
  • HTML Quotation and Citation Elements
  • HTML Comments
  • HTML Colors
  • HTML Styles – CSS
  • HTML Links
  • HTML images
  • HTML Favicon
  • HTML Tables
    • HTML Table Colgroup
    • HTML Table Colspan and Rowspan
    • HTML Table Headers
    • HTML Table Padding and Spacing
    • HTML Table Sizes
    • HTML Table Styling
  • HTML List
  • HTML Ordered Lists
  • HTML Unordered List
  • HTML other lists
  • HTML Block and Inline Elements
  • HTML class Attribute
  • HTML id Attribute
  • HTML Iframes
  • HTML JavaScript
  • HTML File Paths
  • HTML – The Head Element
  • HTML Layout Elements and Techniques
  • HTML Responsive Web Design
  • HTML Computer Code Elements
  • HTML Semantic Elements
  • HTML Style Guide
  • HTML Entities
  • HTML Symbols
  • HTML Emojis
  • HTML Encoding (Character Sets)
  • HTML Uniform Resource Locators(URL)
  • HTML Versus XHTML
  • HTML Forms
  • HTML Form Attributes
  • HTML Form Elements
  • HTML Form Target Attribute
  • HTML Input Attributes
  • HTML Input form Attributes
  • HTML Input Types
  • HTML Canvas Graphics
  • HTML SVG Graphics
  • HTML Multimedia
  • HTML Video
  • HTML Audio
  • HTML Plug-ins
  • HTML YouTube Videos
  • HTML Geolocation API
  • HTML Drag and Drop API
  • HTML Web Storage API
  • HTML Web Workers API
  • HTML SSE API
  • About Us
  • Contact Us
  • Privacy Policy
  • Terms & Conditions

Copyright © 2023 Buzzingz.

Powered by PressBook WordPress theme