HTML CSS Reference/HTML Attributes Reference/selected

Материал из Web эксперт
Перейти к: навигация, поиск

"selected" Example

    
<HTML>
<head><Title>Example For</Title></head>
<BODY>
<select>
   <option>First Option</option>
   <option>Second Option</option>
   <option selected>Third Option</option>
</select>
</BODY>
</HTML>



selected is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |<option>                                                      |
+----------------+--------------------------------------------------------------+



"selected" Syntax and Note

Note:
    
This attribute sets the chosen option in a drop-down or select list.
    
Syntax:
    
<option selected> . . . </option>