HTML Form Types

Date & Time Types

  • Date
    – This is used for input fields that should contain a date.

    Example:
    <input type=“date”>

  • Time
    – It allows the user to select a time.

    Example:
    <input type=“time”>

  • DateTime
    – It allows the user to select date and time.

    Example:
    <input type=“datetime”>


  • Datetime-local
    – It allows the user to select a date and time.

    Example:
    <input type=“datetime-local”>



Cristle Academy

Compiler