Void elements (also called self-closing or empty elements) are HTML elements that cannot have children.
These elements, such as <br>, <img>, and <input>, are self-closing by definition and attempting to give them children violates the HTML specification.
If your application is a rare one that violates HTML standards and places invalid children inside standard elements, this rule may be counterproductive for you.