HTML Selected AttributeThe Selected is an attribute of the <option> 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. SyntaxExample: The following example uses the Selected attribute in the <option> tag with the Jaguar value. Test it NowOutput: Example 2: The following example uses the Selected attribute in the <option> tag with the Pomegranate value. Test it NowOutput: Browser Support
Next TopicSimple HTML Pages
|