Welcome to WebmasterWorld Guest from 54.234.8.146

Forum Moderators: incrediBILL

Message Too Old, No Replies

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

     

myrrh

6:48 pm on Jan 4, 2013 (gmt 0)

10+ Year Member



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?

swa66

8:09 am on Jan 5, 2013 (gmt 0)

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



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

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

myrrh

2:19 pm on Jan 5, 2013 (gmt 0)

10+ Year Member



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?"

lucy24

12:09 am on Jan 6, 2013 (gmt 0)

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



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".
 

Featured Threads

Hot Threads This Week

Hot Threads This Month