Introduction: HTML Required Fields

Picture of HTML Required Fields

If you want to make your form fields required so that the browsers stops a user from submitting empty fields, then the "required" attribute is for you. It is supported on most modern browsers and full support information can be found at

Step 1: Locate Your HTML Form

Picture of Locate Your HTML Form

Find the file with the HTML form you want to edit and open it in your favorite text editor.

Step 2: Add the "required" Attribute

Picture of Add the "required" Attribute

Add the "required" attribute to each field that you want to be required.

Step 3: Refresh Your Page and Test

And you are done! Remember to make sure that the browsers your users have supports this by checking the compatibility at


amberrayh (author)2015-06-09

This is very helpful. Thank you for sharing!

About This Instructable




More by NathanS24:HTML Required Fields
Add instructable to: