20.11.2017 Views

My HTML 5

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>HTML</strong>5<br />

<br />

<br />

<br />

<br />

Enter email : <br />

Try to submit using Submit button<br />

<br />

<br />

<br />

<br />

The required attribute<br />

Now you do not need to have JavaScript for client-side validations like empty text box<br />

would never be submitted because <strong>HTML</strong>5 introduced a new attribute<br />

called required which would be used as follows and would insist to have a value −<br />

<br />

This attribute is supported by latest versions of Mozilla, Safari and Chrome browsers only.<br />

<br />

<br />

<br />

<br />

Enter email : <br />

Try to submit using Submit button<br />

<br />

<br />

<br />

<br />

It will produce the following result –<br />

33

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!