Articles → HTML 5 → Required Attribute In Html5
Required Attribute In Html5
Purpose
Syntax
<input type="text" required/>
Example
<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
</head>
<body>
<form>
<input type="text" required/>
<input type="submit" />
</form>
</body>
</html>
Try It
Output
Browser Support
Internet Explorer | Firefox | Chrome | Safari | Opera | Edge |
---|
10.0 | 4.0 | 5.0 | 10.1 | 9.6 | Yes |