Making HTML smaller by removing redundant boolean property values

Boolean properties of HTML elements needed to contain a string value in XHMTL, but while in HTML5, unnecessary weight on the document.

A boolean attribute is one that needs no declared value.

Regular expression for finding such properties.


Replace with &1.


<input required="required"/>
<option selected="selected" multiple="multiple"></option>


<input required/>
<option selected multiple></option>

Another, space before self closing.


Replace with />


<input />
<img />



Additional reduction could be achieved by removing the closing slash from above examples. Arguments on doing so can be read further from