HTML Forms are the place where the user sends data to a web server in a web site or application. An HTML form consists of one or more input elements (widgets). The form elements are often paired with a label element which describes their purpose.

A simple form

<form id="input" action="" method="post">
<fieldset>
<legend>Create an Account</legend>
<div>
	<label>Username:</label>
	<input type="text" name="user" required>
</div>
<div>
	<label>Email:</label>
	<input type="email" name="email" required>
</div>
<div>
	<label>Password:</label>
	<input type="password" name="pwd" required>
</div>
<div>
<input type="checkbox" name="policy" required><label>I agree to Blabla Terms of Service</label>
</div>
<button type="submit" value="Submit">Create account</button>
<button type="reset">Reset</button>
</fieldset>
</form>
		

Style

#input { background-color: white; border-radius: 10px; border: 2px solid beige; padding: 10px; border-top-width: 20px; margin: 0 auto; width: 600px; } label { display: inline-block; text-align: right; width: 90px; } input { width: 200px; box-sizing: border-box; margin-bottom: 2em; } button { cursor: pointer; font-family: arial,sans-serif; font-size: 13px; font-weight: bold; margin: 11px 4px; min-width: 54px; height: 36px; line-height: 27px; padding: 0 16px; text-align: center; }