Only the first one is valid. If you want to be compatible with XHTML, it should be disabled="disabled"
:
Boolean attributes may legally take a single value: the name of the attribute itself (e.g., selected="selected"
).
In HTML, boolean attributes may appear in minimized form -- the attribute's value appears alone in the element's start tag. Thus, selected may be set by writing:
<OPTION selected>
instead of:
<OPTION selected="selected">
Authors should be aware that many user agents only recognize the minimized form of boolean attributes and not the full form.
http://www.w3.org/TR/REC-html40/intro/sgmltut.html#h-3.3.4.2
In HTML5, the value can also be an empty string:
If the attribute is present, its value must either be the empty string or a value that is a case-insensitive match for the attribute's canonical name, with no leading or trailing whitespace.
it is considered to be equivalent to the form with any value.