Skip to content

Instantly share code, notes, and snippets.

@stevenharman
Created June 16, 2011 15:44
Show Gist options
  • Save stevenharman/1029537 to your computer and use it in GitHub Desktop.
Save stevenharman/1029537 to your computer and use it in GitHub Desktop.
a better way to label a form input.
<!-- see: http://www.w3.org/TR/html5/forms.html#the-label-element -->
<!-- stop doing this -->
<label for="post_title">Title:</label> <input type="text" id="post_title" name="post[title]">
<!-- start doing this! -->
<label>Title: <input type="text" name="post[title]"></label>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment