WeCodeAcademy
❮ stepautofocus ❯

pattern

A regular expression the value must match.

Applies to: input

Syntax

<input pattern="[0-9]{3}">

Example

Examplehtml
Open in editor »

← All of HTML Attributes