Simple example of html5 form with validation

Hello, I would like to show, a simple example of form written in html5, with fields validation using default html5 attributes.

<!DOCTYPE html>
<meta charset=”utf-8″ />
<title>Form 1</title>

<input type=”text” name=”first_name” required placeholder=”First name” ><br>

<input type=”email” name=”e_mail” required placeholder=”Your e-mail” ><br>

<textarea name=”message” required placeholder=”Message”></textarea><br>

Accept regulations <input type=”checkbox” name=”regulations” value=”1″ required ><br>

<input type=”submit” value=”Send Form” >


Leave a Reply

Your email address will not be published. Required fields are marked *