HTML5 Form Input Types and Attributes

  • HTML5 has introduced 13 new input types and several new attributes for <form> and <input> tags.
  • You can determine your browser supporting various features of HTML5 using
  • Not all browsers fully support HTML5 new input types and attribute.

<form id="myform">
    Name: <input name="name" required placeholder="Your name" pattern="[A-z]{10}" />
    Email: <input type="email" name="email" required placeholder=""/>
    URL: <input type="url" name="url" placeholder="Homepage URL"/>
    Age: <input type="number" name="age" min="18" max="99" />
    Description: <textarea name="desc" placeholder="Description text here"></textarea>
    <input type="submit" value="Submit" />

Leave a Reply

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