AgerNic.com
WEB DEVELOPER SITE, HTML, CSS, PHP, SQL

HTML form select


<< Previous Page
HTML tutorial
Next Page >>
HTML tutorial

HTML Tutorial » HTML Form select

What is HTML form selected?

An HTML form selectet is used to collect user input from a drop-down list. The user input is most often sent to a server for processing.

 <select> tag is used to create a drop-down list .

<select> tag is most used in a form, to collect user data input.

The <option> element inside the <select> tag define the options in the drop-down list.

Always add  <label> element for best accessibility practices!

Syntax:

<form action="your link action">
<label> your keyword </label>
<select name="value">
.......
</select>
</form>

The select attribute appears between our opening" <form>" tag and "</form>" without quotes.

Example of Form Select option


Browser Support HTML form action

Element chrome browser
 Chrome
ie browser
 IE
firefox browser
 Firefox
opera browser
 Opera
safari browser
 Safari
Form Select option Yes Yes Yes Yes Yes

 

HTML form select option

How do you create a form select action?
The <select> HTML element represents a control that provides a menu of options.

We shows a typical example form with <select> usage and we associate an id attribute
to enable it to be connected with a <label> for accessibility purposes.
Then a name attribute to represent the name of the associated data point submitted to the server.

For a better understanding we present an example:

Example (this is HTML - PHP editor, change text on this window)
<!DOCTYPE html>
<html>
<body>

<h1>The select option element</h1>

<form action="your action URL page">
<label for="towna">Choose a town:</label>
<select name="towns" id="towns">
<option value="volvo">Paris</option>
<option value="saab">Madrid</option>
<option value="opel">New York</option>
<option value="audi">Tokyo</option>
</select> <br><br>
<input type="submit" value="Submit">
</form>

<p>Select your town and then click the "Submit" button and the form-data will be sent to a page on the
server.</p>

</body>
</html>

 

Related subjects:
HTML form action. How to create? What is HTML forms? Form action attribute

Tags:select option - default, required, color, multiple values, value, disabled, exemple, selected, placeholder, images

 

HTML form select multiple items

We make an example where a user can choose multiple choices using checkbox

Example (this is HTML - PHP editor, change text on this window)
<!DOCTYPE html>
<html>
<body> <h1>Form select multiple itemst</h1>

<form method="post" action="your URL action">
<fieldset>
<legend>What is Your Favorite Town?</legend>
<input type="checkbox" name="favorite_town"
value="Cats">Tokyo<br>
<input type="checkbox" name="favorite_town"
value="Dogs">London<br>
<input type="checkbox" name="favorite_town"
value="Birds">Barcelona<br>
<input type="checkbox" name="favorite_town"
value="Birds">Paris<br>
<br>
<input type="submit" value="Submit" />
</fieldset>
</form>

<p>Select your town and then click the "Submit"
button and the form-data will be sent to a page on the
server.</p>

</body>
</html>

The users also ask: form select multiple items, options, files, checkboxes, radio buttons, columns, values php, array, rows, example, post.

 

Form select radio button

Radio buttons let a user select only one of a limited number of choices:

The <input type="radio"> defines a radio button. Radio buttons are presented in radio groups and only one radio button can be selected at the same time in a group.

Example (this is HTML - PHP editor, change text on this window)
<!DOCTYPE html>
<html>
<body>

<h1>How to display Radio Buttons</h1>

<form action="your URL page action">
<p>Please select your favorite Web language:</p>
<input type="radio" id="html"
name="fav_language" value="HTML">
<label for="html">HTML</label><br>
<input type="radio" id="css"
name="fav_language" value="CSS">
<label for="css">CSS</label><br>
<input type="radio" id="PHP"
name="fav_language" value="PHP">
<label for="css">PHP</label><br>
<input type="radio" id="ASP"
name="fav_language" value="ASP">
<label for="css">ASP</label><br>
<input type="radio" id="javascript"
name="fav_language" value="JavaScript">
<label for="javascript">JavaScript</label>
</form>

</body>
</html>

Tags: HTML form action JavaScript function call witm parameters,
method POST, onsubmit javascript validation.

 



form select, option, multiple, placefolder, default, required, tag, value, default blank, drop down list, example
HTML form select - html tutorial

Online Editor
ONLINE EDITOR

news templates


COLOR PICKER

news templates
This tool makes it easy to create, adjust, and experiment with custom colors for the web.


HTML Templates
news templates
Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.


CSS HTML Layout
news templates
Find here examples of creative and unique website layouts.


Free CSS HTML Menu
news templates
Find here examples of creative and unique website CSS HTML menu.


HTML Img Background
HTML Image Link
HTML Image Size
HTML Text Style
HTML Text Align
HTML Text Size
HTML Text Color Style
HTML Text Color
HTML Table Color
HTML Table Row Colspan
HTML Table Width
HTML Table Style
HTML Table Border
HTML Table
HTML Font Face
HTML Font Size
HTML Font Color
HTML Headings
HTML div border color
HTML div class
HTML class container
HTML form action
HTML comment
HTML link new tab
HTML link underline
HTML link tag
HTML button action
HTML button onclick
HTML button link
HTML table style
HTML image
HTML colors
HTML div style
Text, paragraf in HTML
HTML Tags Attributes
HTML - Elements
HTML Introduction
Home HTML Tutorial
Online Editor
ONLINE EDITOR

news templates


COLOR PICKER

news templates
This tool makes it easy to create, adjust, and experiment with custom colors for the web.


HTML Templates
news templates
Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.


CSS HTML Layout
news templates
Find here examples of creative and unique website layouts.


Free CSS HTML Menu
news templates
Find here examples of creative and unique website CSS HTML menu.


jQuery replace...
jQuery replaceClass...
jQuery click ()...
jQuery switchClass()...
jQuery draggable()...
jQuery HTML...
jQuery scroll smooth...
jQuery scroll()...
jQuery stop()...
jQuery animate()...
jQuery SlideToggle()...
jQuery slideDown()...
jQuery slideUp()...
jQuery fadeToggle...
jQuery fadeOut()...
jQuery fadeIn()...
jQuery Effects - hide () and show ()...
jQuery Events...
jQuery Attributes...
jQuery Selectors...