+ 3
If "required" & "disabled" are attributes of <form> element then why dont we use the format of attributes [name="value"] ?
Why they are written as it is without name and quotation marks.....
7 Respostas
+ 7
Because writing this:
<input type="text" disabled/>
is just the same as this:
<input type="text" disabled="true" />
Default 👆
+ 3
The value can be any string
Only the existence of the attribute makes it true.
<button disabled=”sololearn”>Button</button>
without any value the selector is just the attribute
button[disabled]
Or in this case
button[disabled=”sololearn”]
+ 2
You could write required="required", disabled="disabled"
+ 1
I assume that if name and value are same we can write value itself
+ 1
You're right
+ 1
Is it [disabled="true"] or [disabled="disabled"] ?
- 2
it's got to be something