Posted By

tylerhall on 11/01/06


Tagged

form xhtml sample


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

jonhenshaw
luxuryluke
Hirmine
kate


Sample XHTML Form


 / Published in: HTML
 

This is a sample XHTML form with fieldset, legend, and labels in place.

  1. <form action="" method="post">
  2. <legend>Registration Form</legend>
  3. <p class="alert">Alert Message</p>
  4. <p><label for="name">Name:</label> <input type="text" name="name" id="name"/></p>
  5. <p class='error'><label for="email">Email:</label> <input type="text" name="email" id="email" /> <span>(you will have to verify your email address, so use a real one)</span></p>
  6. <p><label for="password1">Password:</label> <input type="password" name="password1" id="password1" /></p>
  7. <p><label for="password2">Confirm Password:</label> <input type="password" name="password2" id="password2" /></p>
  8. <p><label for="tos" for="tos">Terms of Service:</label> <div class="message" id="tos">
  9. <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
  10. <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
  11. <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
  12. <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
  13. <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
  14. </div></p>
  15. <p><label for="agree">&#160;</label> <input type="checkbox" name="agree" id="agree" /> I have read and agree to the Terms of Service</p>
  16. <p><label for="btnsubmit">&#160;</label><input type="submit" value="Register" name="btnsubmit" id="btnsubmit" /></p>
  17. <p></p>
  18. </form>

Report this snippet  

You need to login to post a comment.