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>
<html>
<head>
<meta charset=”utf-8″ />
<title>Form 1</title>
</head>
<body>
<div>
<form>

<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” >

</form>
</div>
</body>
</html>

Leave a Reply

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