html tutorial - required Attribute in HTML - html5 - html code - html form
Learn html - html tutorial - Required attribute in html - html examples - html programs
- The required attribute is used to specify the input is required and that should not be blank during the form submission.
- This is a Boolean attribute.
Syntax for required attribute in HTML:
Difference between HTML4.01 and HTML 5:
- HTML4 does not support the required attribute.
- The required attribute is new to HTML5.
Sample coding for required attribute in HTML:
Code Explanation for required attribute in HTML:
- This required attribute used to specifies that the input should be filled during the form submission.
Sample Output for required attribute in HTML:
- Click the submit button with the blank textbox.
- When the user try to submit the form the browser shows the warning message.
Browser Support for required attribute in HTML :