A Simple HTML5 Form Validation
by Daniel Hall
HTML
<h1>A Simple HTML5 Form Validation</h1>
<p>Leave the field empty and submit the form to see what happens.</p>
<form>
<label for="name">* Name</label>
<input type="text" id="name" required>
<input type="submit" value="Submit">
</form>
<footer>Which browsers support this feature? - <a href=http://caniuse.com/form-validation>Caniuse.com</a></footer>
CSS
body {
margin: 1em;
}
footer {
margin-top: 2em;
}