Did you know: Some closing HTML tags are optional?

by Woods369on 1/16/2025, 3:58 PMwith 4 comments

by theandrewbaileyon 1/16/2025, 4:04 PM

Useful for code-golfing HTML, but the complexity of rules sounds like a maintenance nightmare for professional use.

by metalohaon 1/16/2025, 9:41 PM

I've never dived (dove? doven?) into the output of an HTML minimizer, but I assumed this was one of the things it would do - remove all optional tags while retaining the same DOM tree output.

by beardywon 1/16/2025, 5:27 PM

HTML was intended at first to be hand crafted by scientists. That it should be forgiving is a good thing, because who wants a "this page has imperfect html" message.