Enter HTML5 entry to proficient:<select> label

Source: Internet
Author: User
Keywords tags HTML5 Getting started to master

"Reprint please retain the integrity of the content of the Wind network article, if you do not comply with this principle, we will retain the right to pursue legal responsibility"

<select> Label

Definitions and usage

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

Differences between HTML 4.01 and HTML 5

HTML 5 has some new properties and no longer supports some HTML 4.01 properties.

Tips and Comments:

Wind Network (www.ithov.com) Tip: Use this tag in the form element to accept user input.

Example

<select>
<option http://www.aliyun.com/zixun/aggregation/9541.html ">value=" Volvo ">Volvo</option>
<option value= "Saab" >Saab</option>
<option value= "Opel" >Opel</option>
<option value= "Audi" >Audi</option>
</select>

Property

The

Property Value Description 4 5 Autofocus True false causes the Select field to focus when the page loads.   The 5 data URL is used for automatic insertion. 5 Disabled true False when this property is true, the menu is disabled.   4 5 Form True false defines one or more forms to which the Select field belongs. 5 ListBox True False when this property is true, it is specified that multiple items can be selected at once. 4 5 name Unique_name defines a unique identifier for the Drop-down list. 4 5 Size number defines how many items are visible in the menu. Not supported. 4

Standard properties

Class, Contenteditable, ContextMenu, dir, draggable, id, irrelevant, lang, ref, Registrationmark, TabIndex, template, For a complete description of the title, visit the standard properties in HTML 5.

Event Properties

Onabort, onbeforeunload, onblur, onchange, onclick, OnContextMenu, ondblclick, Ondrag, Ondragend, OnDragEnter, OnDragLeave, OnDragOver, ondragstart, OnDrop, OnError, onfocus, onkeydown, onkeypress, onkeyup, onload, OnMessage, OnMouseDown, OnMouseMove, onmouseover, onmouseout, onmouseup, OnMouseWheel, OnResize, Onscroll, Onselect, onsubmit, OnUnload for a complete description, visit the event properties in HTML 5.

Tiy instance

Simple Drop-down List

<html>
<body>
<form>
<select name= "Cars" >
<option value= "Volvo" >Volvo</option>
<option value= "Saab" >Saab</option>
<option value= "Fiat" >Fiat</option>
<option value= "Audi" >Audi</option>
</select>
</form>
</body>
</html>

This example shows how to create a simple drop-down list box in an HTML page. The Drop-down list box is an optional list.

Another drop-down list

<html>
<body>
<form>
<select name= "Cars" >
<option value= "Volvo" >Volvo</option>
<option value= "Saab" >Saab</option>
<option value= "Fiat" Selected= "selected" >Fiat</option>
<option value= "Audi" >Audi</option>
</select>
</form>
</body>
</html>

This example shows how to create a simple drop-down list with preselection values. (Note: Preselection values refer to predetermined preferences.) )

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.