I may be mistaken, but I thought since HTML was straying from it's roots as XML, there was a push to make HTML more like XML again. This is in the sense of leaving styling up to something else (like CSS) and syntax (such as putting the closing /
in a tag). For example, XHTML strict doesn't validate if there is any inline CSS; all CSS needs to be external. With HTML 5 this doesn't really seem to be the case—for example, see this question about <br>
vs <br />
. Also there are tags for media like <audio>
and <video>
.
So, here's my question: When coding HTML, should one err on the side of XML or go with the minimal of the newest HTML standards outline? For example, if the standard says a tag doesn't need a closing slash, don't include it?
The answers to the linked-to question are good, but they explain what can be done, not what should be done.