You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: 2-ui/4-forms-controls/1-form-elements/article.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -244,7 +244,7 @@ This syntax is optional. We can use `document.createElement('option')` and set a
244
244
- `defaultSelected` -- if `true`, then `selected` HTML-attribute is created,
245
245
- `selected` -- if `true`, then the option is selected.
246
246
247
-
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.
247
+
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.
248
248
249
249
In practice, one should usually set _both_ values to `true` or `false`. (Or, simply omit them; both default to `false`.)
0 commit comments