HTML Tag <SELECT>

HTML Tag <SELECT>

<SELECT> Specifies a selection list within a form. Use the <OPTION> tags to specify items in the selection list.

Attribute of <SELECT> Tag

ACCESSKEY

Indicates a keystroke sequence associated with the selection list.

<SELECT NAME="size" ACCESSKEY=S>

Possible Values

Any Character.



CLASS

Indicates which style class applies to the element.

<SELECT NAME="color" CLASS="dkm">

Possible Values

Any Class Name.



DATAFLD

Indicates a column from previously identified tabular data.

<SELECT NAME="color" DATASRC="#data_table" DATAFLD="clr">

Possible Values

Data Field Name.



DISABLED

Denies access to the selection list.

<SELECT NAME="color" DISABLED>

Possible Values

DISABLED



ID

Assigns a unique ID selector to an instance of the <SELECT> tag. When you then assign a style to that ID selector, it affects only that one instance of the <SELECT> tag.

<SELECT ID="dkm" NAME="Subject">

Possible Values

Any ID name.



MULTIPLE

Indicates that a visitor can select more than one selection list item at the same time.

<SELECT MULTIPLE> <OPTION>PHP<OPTION> <OPTION>ASP<OPTION> <OPTION>JSP<OPTION> </SELECT>

Possible Values

MULTIPLE



NAME

Gives a name to the value you are passing to the form processor. This establishes a namevalue pair with which the form processor application can work.

Select Tutorial Subject: <SELECT SIZE=4 NAME="subject"> <OPTION>PHP <OPTION>JSP <OPTION>ASP <OPTION>JAVASCRIP <OPTION>SQL <OPTION>VB.NET </SELECT>

Possible Values

Any name for the identification.



READONLY

Indicates that your visitor cannot modify values within the selection list.

<SELECT NAME="color" READONLY>

Possible Values

READONLY



SIZE

Specifies the number of visible items in the selection list. If there are more items in the selection list than are visible, a scrollbar provides access to the other items.

<SELECT SIZE=3>

Possible Values

Any integer Number.



STYLE

Specifies Style Sheet commands that apply to the contents within the <SELECT> tags.

<SELECT STYLE="background: red" NAME="color">

Possible Values

CSS Property with value.



TABINDEX

Indicates where in the tabbing order the selection list is placed.

<SELECT NAME="subject" TABINDEX=3>

Possible Values

Index number.



TITLE

Specifies text assigned to the tag. You might use this attribute for context-sensitive help within the document. Browsers may use this to show tool tips over the selection list.

<SELECT TITLE="Select subject" NAME="subjects">

Possible Values

Any text message.




CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online Exam Quiz O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Best Website and Software Company in Allahabad Website development Company in Allahabad