HTML Intro

HTML Intro Quiz

HTML Intro Exercise

HTML Basics

HTML Basic Quiz

HTML Basic Exercise

HTML Advance

HTML Advance Quiz

HTML Advance Exercise

HTML Tags List

HTML Global Attributes

HTML Attributes


HTML pattern Attribute

HTML pattern Attribute



The pattern attribute specifies a regular expression that the input element value is checked against.


Pattern attribute works with following input types:-


  • < input type="date" >
  • < input type="search" >
  • < input type="url" >
  • < input type="tel" >
  • < input type="email" >
  • < input type="password" >
  • < input type="text" >


For your Information:-


We can use the title attribute to describe pattern to help users.


Used With:-


Element Attribute
input pattern




Its syntax is:- < element pattern="value" >

Code Explanation

All Tutorials related to HTML Attributes

All Sections related to HTML