Update article.md

This commit is contained in:
Zearin 2021-01-25 11:01:01 -05:00 committed by GitHub
parent b93be7398a
commit d78ce9ca32
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -246,7 +246,7 @@ This syntax is optional. We can use `document.createElement('option')` and set a
The difference between `defaultSelected` and `selected` is that `defaultSelected` sets the HTML-attribute (that we can get using `option.getAttribute('selected')`, while `selected` sets whether the option is selected or not. The difference between `defaultSelected` and `selected` is that `defaultSelected` sets the HTML-attribute (that we can get using `option.getAttribute('selected')`, while `selected` sets whether the option is selected or not.
In practice, you should usually set _both_ values to `true` or `false` (or omit; that's the same as `false`). In practice, one should usually set _both_ values to `true` or `false`. (Or, simply omit them; both default to `false`.)
For instance, here's a new "unselected" option: For instance, here's a new "unselected" option: