selected="selected" by attribute javascript code example Example: html select option selected true <option selected='selected' />