W3 Mind Logo
Home » HTML5 Input Text Field Validation

HTML5 Input Text Field Validation

				
					<form>
  <ul>  
    <li>
      <label>First Name</label>
      <input type="text" placeholder="Enter Your First Name" name="name" required>
    </li>
    <li>
      <label>Last Name</label>
      <input type="text" placeholder="Enter Your Last Name" name="name" required>
    </li>
    <li>
      <label>Email Address</label>
      <input type="email" placeholder="Eg. info@example.com" name="email" required>
    </li>
    <li>
      <label>Phone Number</label>
      <input type="tel" placeholder="Enter Phone Number" name="phone" required>
    </li>
    <li>
      <label>Password</label>
      <input type="password" placeholder="Enter Password" name="password" required>
    </li>
    <li>
      <label>Gender (Optional)</label>
      <input type="radio" name="gender" id="male">
      <label for="male">Male</label>
      <input type="radio" name="gender" id="female">
      <label for="female">Female</label>
    <li>
    <li>
      <label>Age</label>
      <input type="number" value="18" max="99" min="18" name="age" size="6" required>
    </li>
    <li>
      <label> </label>
      <input type="checkbox" name="terms" size="6" required>
      I have read & agree to the terms and conditions </li>
    <li>
      <label> </label>
      <button type="submit">Sign up</button>
    </li>
</ul>
  </form>
				
			

Example:

  • I have read & agree to the terms and conditions
About Author
Picture of W3Mind

W3Mind

W3Mind focuses on Blogging, Make Money Online, SEO, Business Blogging, Social Media, WordPress, Internet Tools, Web Design and Development.
Give it a Share
Facebook
Twitter
LinkedIn
You May Also Like
How to
START A
BLOG
(step by step)
Load WordPress Sites in as fast as 37ms!