homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

Drop-down form: what's the name of this part?

5+ Year Member

Msg#: 4533317 posted 6:48 pm on Jan 4, 2013 (gmt 0)

When a select list in a form shows by default an instruction such as "Select" or "Month" (in the drop-down list itself, not text above the drop-down box), what is that called?

For example, if I have a drop-down list of the months of the year and I want the list to display the word "Month" by default (and not be a submitted value), what is that function called?



WebmasterWorld Senior Member swa66 us a WebmasterWorld Top Contributor of All Time 10+ Year Member

Msg#: 4533317 posted 8:09 am on Jan 5, 2013 (gmt 0)

<select> and <option> are the tags you seek

Ref: [w3.org...] sections 4.10.9 and 4.10.12


5+ Year Member

Msg#: 4533317 posted 2:19 pm on Jan 5, 2013 (gmt 0)

Thanks for your reply.

I was concerned that my question was not clear. Your reference led me to what I believe is my answer and I would like confirmation that I'm correct.

I was not seeking how to do it but what the name of that item is.

Is it called a "placeholder" or is it called a "placeholder label option?"


WebmasterWorld Senior Member lucy24 us a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month

Msg#: 4533317 posted 12:09 am on Jan 6, 2013 (gmt 0)

Are you asking what it's called in ordinary conversation or what you call it in the HTML code?

In HTML4 the dropdown item that's pre-selected, if any, gets an extra attribute selected = "selected" (equivalent to checked = checked when it's a checkbox).

It sounds as if you're in HTML 5 which adds the "placeholder label option" along with "defaultSelected". The difference depends on whether your user is allowed to stay with the default or has to pick something else.

A "placeholder" alone is essentially the same in 4 and 5 except that in 4 it didn't have a special name. It goes in text-input fields-- which may have different names in HTML 5-- to say things like "Smith, John" or "Explain your problem here".

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved