semantics - Assigning class and placeholder to html option and select tags -
is semantically incorrect assign class <option> tag or placeholder on <select> tag? there other downsides of it?
class global attribute in html5 , can applied option placeholder isn't allowed on select. why? practical/historical reasons first option displayed in select - of size < 2 - , doesn't leave room displaying text in empty input[type="text"]
how achieve same effect placeholder in text input? don't need it:
(html5 doc on placeholder)
placeholder attribute represents short hint (a word or short phrase) intended aid user data entry when control has no value.
- selecting option doesn't need data entry (a date need format indicated, mm/dd/aaaa or dd/mm/aaaa...)
- there's label indicate purpose of select (associated
for/idattributes on each) - what should put in first option? that's excellent question... between
-------("oh user may not see select"),please select blah,(repeating label),first option we'll never know if user did choose option or forgot select one... that's ergonomics problem , not field of expertise. ;)
Comments
Post a Comment