Alaska under the moon in the starry night
Statue of Liberty in Liberty Island in New York Harbor
USA stars Eye in the sky

Main (Home) page. USA 2017 "Lesson 16." - Forms: The <select> Element.


Somebody think about future. We make future today. USA2017.INUMO.RU. Peace, freedom, happiness for everyone in USA and everywhere on the Earth in 2017.

USA2017 :: "Lesson 16." - Forms: The <select> Element.

I searched all day along and finally found out all I need on USA2017.
/From the "Feedback collection on USA2017.INUMO.RU", USA2017.INUMO.RU./

HTML tutorial on USA 2017 Forms: The <select> Element. Lesson 16. The <select></select> element defines a drop-down list. The <option> elements defines the options to select. The list will normally show the first item as selected. You can add a selected attribute to define a predefined option. The <select> element must have attribute name. Attribute name is a name of variable to pass to a form-handler. Attribute checked set <option> is chosen at first. Attribute size of <select> element sets how many <option> elements will be shown. If attribute size is omitted then only 1 element will be shown. The multiple attribute is a boolean attribute. When present, it specifies that the user is allowed to enter more than one value in the <select> element. To mark option use combinations: CTRL-left mouse button and SHIFT-left mouse button.
First publication rights USA 2017 com



The <select> Element.

The <select></select> element defines a drop-down list. Elements in a drop-down list are similar to Lists, that we have studied before.

Basic difference of <select> from lists is that in case of <select> elements an user can make a choice and pass it to a form-handler.

Each element is concluded into pair of <option></option>.

There are following features we have to know to use <select> element:
  1. type is omitted - tag <select> has no attribute type. Tag <select> itself determine that here is must be choice from a set of elements.
  2. name="states_of_us" - the <select> element must have attribute name. Attribute name is a name of variable to pass to a form-handler.
  3. checked="checked" - Attribute checked set <option> is chosen at first.
  4. value="ny" - you can use attribute value for tag <option>. You can omit attribute value for tag <option>. If you use <option value="ny">New York</option> then variable name from tag <select> will get value "ny". If you use <option>New York</option> then variable name from tag <select> will get value "New York".
  5. size="3" - Attribute size of <select> element sets how many <option> elements will be shown. If attribute size is omitted then only 1 element will be shown.
  6. multiple="multiple" - The multiple attribute is a boolean attribute. When present, it specifies that the user is allowed to enter more than one value in the <select> element. To mark option use combinations: CTRL-left mouse button and SHIFT-left mouse button.
Codes to set into the test page:
<form action="formdata.php" method="POST" name="form1">
<p><label>Name (max 32 chars): <input type="text" name="name1" size="32" maxlength="32" /></label></p>
<p><label>Password (max 6 chars): <input type="password" name="pas1" size="10" maxlength="6" /></label></p>

<p>Do you love America? ::::: 
<label>Yes<input type="radio" name="love_america" value="yes" checked="checked" /></label> ... or ... 
<label>No<input type="radio" name="love_america" value="no" /></label>
</p>

<p>What states of US do you like?</p>
<p>
<label><input type="checkbox" name="ny" value="" />New York</label>  &nbsp; &nbsp; &nbsp; 
<label><input type="checkbox" name="florida" value="" checked="checked" />Florida</label>  &nbsp; &nbsp; &nbsp; 
<label><input type="checkbox" name="texas" value="" />Texas</label>  &nbsp; &nbsp; &nbsp; 
</p>
<p>What states of US do you like (choice using select)?</p>
<p>
<select name="states_of_us" size="3" multiple="multiple">
	<option value="ny">New York</option>
	<option value="florida" selected="selected">Florida</option>
	<option value="texas">Texas</option>
</select>
</p>
</form>

So we have placed mentioned above things on our test webpage:
article_016.html ← click to view, how it looks on this website...
article_016.zip ← download this webpage in zip archive to set on your website.

To visit more lessons use navigation bar below ↓,


More Info about "HTML and Internet basics" → ↓

"1&1" - one of the largest web hosts in the world.

Register with one of the largest web hosts in the world.

Our broad product portfolio of domains, website packages, web hosting packages and high-end server solutions gives you plenty of choice.

Click Here → ↓


Happy new searching to you!

What to do and where to go?

If you plan to come back later...
Please remember this page -
URL: https://usa2017.inumo.ru/html/p016.html
Basket is empty

Love Me Do portal. Miss USA 2017.
"Love Me Do"

Keep pornography out & protect your family. Content watch :: Stop Internet Porno. Free computer scan.
Content watch :: Stop Internet Porno.

Adobe Macromedia.
Adobe Macromedia.

"Love Me Do" portal on USA 2017.
"Love Me Do" portal on USA 2017.

Hosting Observer.
Hosting Observer.

Music portal on USA2017.INUMO.RU
Music portal on USA2017.INUMO.RU

USA2017.INUMO.RU Attention! Thank you for visit! I wish you great success in present and future!
Pleeeeeeease, don't forget to vote for me in 2017! Thanks for your support.
© CopyRight(R), CopyLeft(L), CopyCat(C) 2017, President of USA. USA2017.INUMO.RU.
We make future today. Join us now! Peace, freedom, happiness, for everyone in USA and everywhere on the Earth in 2017.
Our very special thanks for support to: Team of the hosting company.
News from USA 2017. Sign up!
Close and hide in basket
Account Now. Free direct deposit. Visa card. 100% Approval. $25 Bonus when you set up direct deposit. Sign Up in 60 seconds.
Close and hide in basket
Butlers Bubbly Game. Snow and skiing - the perfect holiday! Until Billy the Butler gets a thirst for your bubbly! Stop Billy before he polishes off ALL the champagne 'Moet et chandon' and stand in line to win incredible prizes!
Close and hide in basket
eToro. While markets plummet... You profit.