Using Input Validation - HTML CSS HTML Tag

HTML CSS examples for HTML Tag:input

Introduction

You manage input validation through attributes.

The following code shows which elements (and input types) support the different validation attributes.

Validation Attribute
Elements
required

textarea, select, input (the text, password, checkbox, radio, file, datetime,
datetime-local, date, month, time, week, number, email, url, search, and tel types)
min, max
input (the datetime, datetime-local, date, month, time, week, number, and range types)
pattern
input (the text, password, email, url, search, and tel types)

Demo Code

ResultView the demo in separate window

<html>
   <head></head>
   <body></body>
</html><!--from w  w  w  . jav a 2s. c  o  m-->

Related Tutorials