HTML vs XHTML Debate

This cluster discusses the history, design philosophy, and evolution of HTML compared to XHTML, debating its forgiving nature versus strict XML syntax, why XHTML failed, and suitability for human vs machine generation.

➡️ Stable 0.7x Web Development
4,844
Comments
20
Years Active
5
Top Authors
#3682
Topic ID

Activity Over Time

2007
3
2008
63
2009
209
2010
159
2011
182
2012
171
2013
212
2014
239
2015
190
2016
234
2017
262
2018
224
2019
316
2020
347
2021
303
2022
372
2023
439
2024
348
2025
482
2026
89

Keywords

e.g PHP DTD JS youtube.com IDE UI XML MIME RFC html xml html5 markup css parsers semantic parse compliant elements

Sample Comments

Well, html had it sorted out three decades ago...

maccolgan Aug 4, 2021 View on HN

At this point HTML is quickly turning into not a markup language

bjoli Jul 20, 2025 View on HN

I will be that guy: HTML is not XML. People wanted to write malformed html so xhtml never went anywhere.

jensus Mar 26, 2022 View on HN

The evolution of HTML and CSS clearly shows that HTML isn't suited to describe a interface without massive hints to a rendering engine to manipulate it

amirouche Aug 4, 2017 View on HN

HTML is ironically very nice as a standard, even if broken by design. Think about crawlers for instance, which would not be possible without HTML.

phkahler Mar 9, 2019 View on HN

HTML was meant to be written by humans.

pjmlp Feb 27, 2015 View on HN

HTML is anything but general purpose.

SahAssar Mar 17, 2020 View on HN

Only for HTML, not for CSS & JS. JS is handled by TC39 and CSS is still at W3C.

wooptoo Jan 17, 2024 View on HN

HTML was not really meant to be generated by humans. Just like XML, it's supposed to be machine readable first and foremost.

dmsnell Sep 16, 2024 View on HN

For better or worse XHTML, also known as the XML serialization of HTML, cannot represent all valid HTML documents. HTML and XML are different languages with vastly different rules, and it's fairly moot now to consider replacing them.Many of the "problems" with HTML are still handled adequately simply by using a spec-compliant parser instead of regular expressions, string functions, or attempting to parse HTML with XML parsers like PHP's `DOMDocument`.Every major browser