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


Picture showing the output of Required attribute in HTML5



Browser Support


Internet ExplorerFirefoxChromeSafariOperaEdge
10.04.05.010.19.6Yes



Posted By  -  Karan Gupta
 
Posted On  -  Saturday, November 24, 2018

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250