@BasilBourque To re-iterate what I explained elsewhere to you personally. Go through the actual specification in HTML5 for the tags and things and you may by no means, EVER obtain any advice or recommendation to have to have or advise to use a closing slash for the people tags.
@BasilBourque, I do think This may be given by that mostly The solution's 1st sentence is overly brief / deceptive: " is sufficient but in XHTML is favored ..." => 1 could infer That may be Utilized in XHTML, which is not truth of the matter.
I have tried examining other responses, but I am still baffled — Specially just after seeing W3schools HTML five reference.
Edit: Now that we are all crazy about specs, I feel it well worth mentioning that Based on dev.w3.org:
You should not serve it with an XML declaration if employing text/html, although the content could be normally legitimate XML (e.g. produced from something which outputs XML, like XSLT output or an object that serializes to XML).
HTML may be nicely fashioned, but not be legitimate XML. W3Schools isn't probably the most authoritative reference.
New security features such as Content Security Policy guard people much more properly, although new get the job done incorporated from ARIA can help developers offer you those with disabilities a superb consumer experience of their programs.
As noted in 1. is also valid for HTML5 that occurs to become produced as XML but served as a daily text/html with out
Simultaneously, browers gave up wanting to implement the expectations, since All people will get it Incorrect. It's not clear:
The superb validator at is really helpful for checking what is valid (While I'm not sure you'll be able to rely upon it to also Look at content material-type).
This query's answers certainly are a Group energy. Edit existing solutions to enhance this put up. It is not at this time accepting new solutions or interactions.
and don't fulfill the requirements of XML and XHTML given that they would not have closing tags, eg: or are legitimate, will not be legitimate XHTML or XML. HTML, not surprisingly, doesn't have the well-shaped requirement so and they are legitimate in HTML only.
In fact, Area in advance of / is preferred for compatibility sake, but I believe it only is smart for tags that have characteristics. So I would say both or , whichever pleases your aesthetics.
In order to use XML or XHTML, then you aren't utilizing HTML and that is a special story. Usually do not make use of a closing slash for the people HTML tags. Somewhere else, the spec claims it is possible to set a person there but it means nothing, does practically nothing and browsers free game onine are instructed to disregard it. So it truly is pointless and ineffective creating any usage of it just as pointless and ineffective.