Why does the option tag render selected=selected instead of just selected?
Answer Posted / Ravindra Pratap Singh
The reason the `option` tag renders `selected=selected` instead of just `selected` is due to HTML's requirement for multiple attributes on a single element. If you only wrote `<option selected>`, it would be interpreted as an empty string for the attribute value, which is not valid according to the HTML standard.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
No New Questions to Answer in this Category !! You can
Post New Questions
Answer Questions in Different Category