SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: Web Form Labels inside vs. outside

  1. #1
    SitePoint Zealot samg914's Avatar
    Join Date
    Nov 2009
    Location
    Boston, MA
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile Web Form Labels inside vs. outside

    I am wondering - what are the pros/cons of a web form with the labels outside vs. inside the field? I think forms look much cleaner and save space on the page when the label name is located within the field, but most sites I see put it on the outside. Is there a reason most sites don't do this?

    Thanks,

    Sam

  2. #2
    Mouse catcher silver trophy
    SitePoint Award Recipient Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,107
    Mentioned
    66 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by samg914 View Post
    I am wondering - what are the pros/cons of a web form with the labels outside vs. inside the field? I think forms look much cleaner and save space on the page when the label name is located within the field, but most sites I see put it on the outside. Is there a reason most sites don't do this?
    Ease of use is the obvious one, and accessibility is another. If you're relying on Javascript to clear the field name once a user starts typing into a field then that's going to be messy for anyone without JS running and they're going to have to delete the text manually, which is a nuisance and a lot of the time people will forget to do it. So you'll end up with names in your database like "NaJohn Smithme". And even after you've filled a field in, you might want to check what the label was – you can't do that if it disappears as soon as you start typing.
    Any posts I write in Arial are on my mobile phone, so please excuse typos etc.
    Any posts I write in Verdana are on a PC, so feel free to berate me mercilessly for any mistakes


  3. #3
    It's all Geek to me silver trophybronze trophy
    SitePoint Award Recipient ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, Australia
    Posts
    20,014
    Mentioned
    217 Post(s)
    Tagged
    3 Thread(s)
    Another minor downside could be that once you've clicked into the field, you no longer have a label to remind you what that field is for.

    I doubt that many users are impressed by how nice something looks—despite how much web designers and site owners agonize over this. Clarity and usability are far more important. Make it as easy as possible for people to get what they want. I see no reason not to have clear labels on each form input.

  4. #4
    Robert Wellock silver trophybronze trophy
    SitePoint Award Recipient xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,243
    Mentioned
    51 Post(s)
    Tagged
    0 Thread(s)
    Labels in normative markup languages only appear outside, e.g. outside of the INPUT of type "text" for logical reasons as was discussed. Any text that may appear within an input box is typically a temporary 'placeholder', which has a different functionally to a label. The placeholder is no substitute and only a 'hint', a fall-back mechanism or reminder.

    For example a LABEL might say EMAIL: whereas the placeholder could have something on the lines of: "example @ domain .com" as we can see they have different functionality.
    };-) http://www.xhtmlcoder.com/
    Thinking Web: Voices of the Community

    > March 2013 - SitePoint forums: Spot the Error 3: Calling all Sleuths! Winner Announced!... She knows how to spot simple <code> errors but do you?

  5. #5
    SitePoint Zealot lutrov's Avatar
    Join Date
    Mar 2001
    Location
    Melbourne, Australia
    Posts
    139
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    I agree with what's already been said. From my experience, labels inside textboxes are only something designers actually like the idea of. Real users usually find them irritating, especially when there's more than one field in a form.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •