Skip to content

Latest commit

 

History

History
72 lines (57 loc) · 2.03 KB

input_type.md

File metadata and controls

72 lines (57 loc) · 2.03 KB

Common HTML Input Types:

  1. Text-based inputs:

    • Text: <input type="text">
    • Password: <input type="password">
    • Email: <input type="email">
    • Tel (Telephone number): <input type="tel">
    • URL: <input type="url">
    • Search: <input type="search">
  2. Numeric inputs:

    • Number: <input type="number">
    • Range: <input type="range">
  3. Date and time inputs:

    • Date: <input type="date">
    • Time: <input type="time">
    • Datetime-local: <input type="datetime-local">
    • Month: <input type="month">
    • Week: <input type="week">
  4. Selection inputs:

    • Radio button: <input type="radio">
    • Checkbox: <input type="checkbox">
    • Select: <select><option value="value">Option</option></select>
  5. Action inputs:

    • Submit button: <input type="submit">
    • Reset button: <input type="reset">
    • Button: <input type="button">
  6. File input:

    • File: <input type="file">
  7. Image input:

    • Image: <input type="image">
  8. Hidden input:

    • Hidden: <input type="hidden">
  9. Specialized inputs:

    • Color: <input type="color">
    • Image: <input type="image">
  10. Textarea:

    • Textarea: <textarea></textarea>

Less Common or Specialized HTML Input Types:

  1. Datetime inputs:

    • Datetime: <input type="datetime">
    • Month: <input type="month">
    • Week: <input type="week">
    • Time: <input type="time">
    • Datetime-local: <input type="datetime-local">
  2. Other inputs:

    • Image: <input type="image">
    • Button (without default behavior): <input type="button">
    • Color: <input type="color">
    • Search: <input type="search">
    • Tel (Telephone number): <input type="tel">
    • URL: <input type="url">
    • Range: <input type="range">
    • File: <input type="file">
    • Hidden: <input type="hidden">
    • Week: <input type="week">
  3. Textarea:

    • Textarea: <textarea></textarea>

Choose the appropriate input type based on your data collection needs and user experience goals.