When you don't have need of an alt attribute, add one but keep it empty. In the absence of an alt attribute some screen readers will read out the path of the image instead. Setting it to empty allows you to remove this, almost always, unnecessary noise.
Permitted content: None, this is a void element.
And https://developer.mozilla.org/en-US/docs/HTML/Element/label for an example of doing it correctly
The HTML <label> Element represents a caption for an item in a user interface. It can be associated with a control either by using the for attribute, or by placing the control element inside the label element.
As long as you use the for attribute, it's fine.
<input type="text" required><label>Social Security Number</label></input>
<label>Social Security Number<input type="text" required /></label>
Doing it the wrong way around will still render as you expect, but defeats the purpose as you won't get the click-to-activate behaviour.
Ideally, you'd use them in combination for future proofing. It takes a little work, but you can arrive at the same general outline from both algorithms, since the new one ignores the ordinality of the h tag.
invalid code doesn't mean shitty code, and the other way around - being valid doesn't say anything about the practical quality of code. know your craft = know the rules + know when you can break them.
For instance, the WGAC 2.0 guidelines require that HTML be valid, and if a client wants WGAC 2.0 compliance (even A level, not AA), the site's gotta validate .
http://www.alistapart.com/articles/tohellwithwcag2 "To Hell with WCAG 2" (2006)
 cover your ass engineering
Too many people build something that works for them; on their browser version, at their screen size, on their OS.
That's especially harmful for accessible sites.