+ 1
About class and selected
why we use class and selected tags
1 Resposta
+ 3
'class' and 'selected' are not 'tags' but attributes of tags...
+ class can be set on any element tag, and define one or more class names to be use to style elements with Css:
<div class="myclass">content</div>
<style>
.myclass { background:red; }
</style>
+ selected is a boolean attribute (no need to assign a value) to defined selected element in a group of <option> html elements:
<select>
<option>option 1</option>
<option selected>option 2</option>
<option>option 3</option>
</select>
... will display a dropdown list with the second element default selected...