rm...@rmmillerjr.com wrote:
^^^^^^^^^^^^^^^^^^^^
Please post using your real name.
> <br/> is XHTML syntax and must include the trailing backslash to be valid.
Utter nonsense.
> <br> is the HTML5 itteration of a void element, however it does not
> require a trailing backslash for the sake of validity.
“/” is a _slash_, _not_ a *back*slash. You should learn the basics of a
field before you attempt to lecture others about it.
The slash, or more precisely, the character sequence “/>”, is required in an
HTML5 document written in the XHTML syntax:
<
https://www.w3.org/TR/2016/REC-html51-20161101/introduction.html#html-vs-xhtml>
It can result in invalid markup in an HTML4 document where, per the HTML
4.01 Specification, “<…/>” is equivalent to “<…>>”.
For example, “<meta …/>” would be equivalent to “<meta …>>” in HTML4.
“>” would parse as text content “>”, however text content is not allowed
on the first nesting level of the HEAD element, where an otherwise valid
META element were to be found.
And if the result would not be invalid, it could be the unwanted display of
a “>” character:
Some authors, also through XHTML, have acquired the misconception that
elements with SGML content model EMPTY would need to be “closed” this way in
HTML, too. As a result, some vendors have modified their HTML parsers to
not implement the HTML4 Specification to the letter (there as well) and to
simply ignore the slash when in HTML mode; eventually, HTML5, based on
WHATWG HTML, which is driven by few browser vendors, has standardized this
behavior. However, relying on this parsing behavior in documents written
in earlier versions of HTML than 5 is error-prone and should be avoided.
<
http://dodabo.de/html+css/tests/shorttag.html>