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 |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India