← #136 Pick given properties from a JSON representation

Omit values of HTML boolean attributes

Topics: HTML

There are some HTML boolean attributes such as checked, disabled, readonly, required, selected, etc.

According to the HTML specification, a boolean attribute has three possible declarations. All of them have the same effect:

<input readonly />
<input readonly="" />
<input readonly="readonly" />

true and false are invalid values:

<!-- Not allowed -->
<button disabled="true">...</button>
<button disabled="false">...</button>

The only way to represent a false value is to remove the attribute. Hence, to avoid the incorrect and misleading usages, it's recommended to remove the value:

<input readonly />
Fix a typo or suggest an improvement
#138 Access local webpack dev servers from external devices