XHTML: No Minimization

HTML supports attribute minimization but XHTML does not. HTML allows these minimized attributes, but in XHTML, you cannot utilize them:

<input type="checkbox" name="vehicle" value="car" checked />
<input type="text" name="lastname" disabled />
<option selected>Car</option>

XHTML demands that attribute-value pairs must be written in full. Attribute names such as "selected" and "checked" cannot occur in elements without their value being specified. Unminimized attributes must be written in attribute-value sets, to be done the acceptable way:

<input type="checkbox" name="vehicle" value="car" checked="checked" />
<input type="text" name="lastname" disabled="disabled" />
<option selected="selected">Car</option>
Back button Table of Contents Next button