Các thẻ form mới HTML 5 | HTML5 Input Types

Table of Contents

HTML5 added several new input types:

  • color
    <input type="color" name="favcolor">
  • date
    <input type="date" name="bday">
    Enter a date before 1980-01-01:
      <input type="date" name="bday" max="1979-12-31"><br>
      Enter a date after 2000-01-01:
      <input type="date" name="bday" min="2000-01-02"><br>
    Enter a date before 1980-01-01: Enter a date after 2000-01-01:
  • datetime-local
    <input type="datetime-local" name="bdaytime">
  • email
    <input type="email" name="email">
  • month
    Birthday (month and year):
      <input type="month" name="bdaymonth">
    Birthday (month and year):
  • number
    Quantity (between 1 and 5):
      <input type="number" name="quantity" min="1" max="5">
    Quantity:
      <input type="number" name="points" min="0" max="100" step="10" value="30">
    Quantity (between 1 and 5): Quantity:
  • range
    <input type="range" name="points" min="0" max="10">
  • search
    <input type="search" name="googlesearch">
  • tel
    <input type="tel" name="usrtel">
  • time
    Select a time:
      <input type="time" name="usr_time">
    Select a time:
  • url
    Add your homepage:
      <input type="url" name="homepage">
    Add your homepage:
  • week
    Select a week:
      <input type="week" name="week_year">
    Select a week:
Nguồn:https://www.w3schools.com/html/html_form_input_types.asp -soiqualang.chentreu]]>

Leave a Reply

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