News for hackers. Stuff that matters.
Re:SVG: The Good, the Bad and the Ugly by simias on Friday February 12, 2021 @01:47PM (#26117004)
I agree, HTML is fine (still a bit too verbose IMO, in particular having to repeat the tag to close it always felt useless and very noisy).

But HTML is a markup language, the problem is that for some insane reason a big chunk of the industry at some point decided that XML was a reasonable serialization format. That's where it went really wrong IMO.

Re:SVG: The Good, the Bad and the Ugly by goto11 on Saturday February 13, 2021 @10:23AM (#26124074)
In HTML you can leave out the end tag in cases where they can be unambiguously inferred, like:

   <p>First paragraph<p>Second paragraph</p>
P-element can't be nested, so a <p> will automatically close the previous p-element.

But this also means it is necessary to indicate the tag name in the closing tag. For example this would be ambiguous:

   <div><p>Hello</>
It cannot be inferred if it is the div or p which is closed.

XML is of course different. Since all element have to be explicitly closed, repeating the tag-name in the close tag is in principle superfluous. I think it makes it easier to read though, at the cost of more effort to write.