What represents the value of the pattern attribute of an input element in an HTML
Options:
A.
A SQL statement
B.
A regular expression
C.
A style sheet
D.
A JavaScript function
Answer:
B
Explanation:
The value of the pattern attribute in an input element is a regular expression. This regular expression is used to define what constitutes a valid value for the input.
Regular Expressions: Regular expressions (regex) are sequences of characters that define search patterns. They are commonly used for string matching and validation.
Usage Example:
Here, the pattern attribute value is a regular expression that validates a five-digit number.