HTML Selected Attribute

The Selected is an attribute of the element, which is used to define the default selection in a dropdown-list.

When any option uses this attribute, then that option should be pre-selected and displayed first, when the web page loads.

Syntax

Example: The following example uses the Selected attribute in the tag with the Jaguar value.

Test it Now

Output:

HTML Selected Attribute

Example 2: The following example uses the Selected attribute in the tag with the Pomegranate value.

Test it Now

Output:

HTML Selected Attribute

Browser Support

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

Next TopicSimple HTML Pages




Contact US

Email:[email protected]

HTML Selected Attribute
10/30