Check validity of HTML5 forms using pattern - HTML CSS HTML Tag

HTML CSS examples for HTML Tag:input pattern

Description

Check validity of HTML5 forms using pattern

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
 </head> <!--from ww w .j  a v a  2  s. c om-->
 <body> 
  <form> 
   <label> Part number: <input pattern="[0-9][A-Z]{3}" name="part" title="A part number is a digit followed by three uppercase letters."> </label> 
   <button>submit</button> 
  </form>  
 </body>
</html>

Related Tutorials