Didier Kryn said on Thu, 2 Jan 2025 13:06:06 +0100
>Le 02/01/2025 à 07:09, Steve Litt a écrit :
>> #2 is like using extra parentheses languages like C or in math
>> equations so you don't have to remember exact rules of
>> precedence, and the maintainers who follow you don't either. Those
>> end tags triple the likelihood that your HTML5 technically expresses
>> what you wanted it to. End tag use also gives you an excellent
>> debugging methodology that, if desired, I can reveal in a separate
>> thread.
>
> Please reveal, at least privately.
You put a <div class="diag"> immediately after <body> and
</div><!--end div.diag--> just before </body>. Now you keep moving that
end tag up until the error line number changes. When you find a few
lines of code where the line number changes between putting the end tag
above those lines and below those lines, the problem is somewhere in
those lines.
See also
https://troubleshooters.com/web/validating.htm#xmlchecker
> Remark: in HTML nobody wants <br></br> or <hr></hr>. HTML lacks
> the
><br/> and <hr/> form for such tags, like in SVG.
I use <br/> and <hr/> all the time in HTML5, and it passes both my well
formed XML check and w3c validation.
In HTML5 that's also well formed XML, all tags that CAN be containers
must be <p></p> even if they contain nothing. All tags that
CANNOT be containers must be <hr/> or </br>, or at least that's what the
w3c validator tells me.
Probably most browsers are agnostic on this issue, but non-container
elements should end with slash+greater_than.
SteveT
Steve Litt
http://444domains.com