Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 2 of 2 FirstFirst 12
Results 16 to 17 of 17
  1. #16
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Thanked 626 Times in 605 Posts
    Quote Originally Posted by Philip M View Post
    A good example of a bell/whistle which does not really add anything significant to the ux (as rnd me calls it). IMO. We could still live without it.
    using the placeholder means you don't need a <label> with redundant text around the input. On mobile especially, where space is at a premium, using placeholder (or a legacy fallback) dramatically reduces on-screen clutter and allows a less disorienting next input scroll on iOS.

    unlike label, placeholder typically gives an example instead of direction, which a lot of folks find more instructive.
    for example, (Zip: [ ]) versus ([ 90210 ]). I can tell at a glance of the placeholder that i don't need my 9 digit zip answering a question before moving the mouse.

    one last advantage of placeholder: when combined with the list attrib, you have an indeterminate combo box instead of one with a default value.

    the little scripts that try to replicate placeholder end up being quite long, and usually don't mimic the same behavior exactly. Because it's such a nice design pattern, and because the scripting to replicate it is tedious and fragile, they added it to HTML5.

    you don't have to use HTML5, i'm sure HTML3 still shows up. It's just that they've added such features after listening to the demands of programmers. It's not all about new capabilities, a lot of it is simply removing all the time-consuming tedium and debugging to do simple things like providing an example value on a form input.

    If you like hand-coding because it's fun go ahead, it will work forever. Or, maybe you want the deck chairs of a titanic like IE8 to be comfortable for the next several months while the ship sinks... more power to you.
    Create, Share, and Debug HTML pages and snippets with a cool new web app I helped create: pagedemos.com

  2. #17
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    London, England
    Thanked 2,699 Times in 2,675 Posts
    rnd me - I am prepared to accept that HTML5 has clear advantages on mobile browsers.

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.

Page 2 of 2 FirstFirst 12

Posting Permissions

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