HTML CSS Reference/HTML Attributes Reference/selected

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

"selected" Example

   <source lang="html4strict">
   

<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>


     </source>
   
  


selected is applied to

   <source lang="html4strict">

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

     </source>
   
  


"selected" Syntax and Note

   <source lang="html4strict">

Note:

This attribute sets the chosen option in a drop-down or select list.

Syntax:

<option selected> . . . </option>


     </source>