Created
November 14, 2012 19:58
-
-
Save cjwd-snippets/4074384 to your computer and use it in GitHub Desktop.
HTML: Form with top labels
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form action="/"> | |
<fieldset> | |
<label for="name">Name</label> | |
<input type="text" id="name" class="form-text" /> | |
<p class="form-help">This is help text under the form field.</p> | |
</fieldset> | |
<fieldset> | |
<label for="email">Email</label> | |
<input type="email" id="email" class="form-text" /> | |
</fieldset> | |
<fieldset> | |
<label for="gender">Gender</label> | |
<select id="gender"> | |
<option>Male</option> | |
<option>Female</option> | |
<option>Cylon</option> | |
</select> | |
</fieldset> | |
<fieldset class="radio"> | |
<label for="notifications">Notifications</label> | |
<ul> | |
<li><label><input type="radio" name="notifications" /> Send me email</label></li> | |
<li><label><input type="radio" name="notifications" /> Don't send me email</label></li> | |
<li><label><input type="radio" name="notifications" /> Send me flowers</label></li> | |
</ul> | |
</fieldset> | |
<fieldset> | |
<label for="url">URL</label> | |
<input type="url" id="url" class="form-text" placeholder="http://yourdomain.com" /> | |
</fieldset> | |
<fieldset> | |
<label for="bio">Bio</label> | |
<textarea id="bio"></textarea> | |
</fieldset> | |
<fieldset class="check"> | |
<label><input type="checkbox" /> I accept the terms of service and lorem ipsum.</label> | |
</fieldset> | |
<fieldset class="form-actions"> | |
<input type="submit" value="Submit" /> | |
</fieldset> | |
</form> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment