What is the difference between xhtml and html5? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What is the difference between xhtml and html5?

I was just curious to know what the difference between them is. Aren't they the same thing?

4th Jul 2018, 6:39 PM
Siddh Shah
Siddh Shah - avatar
2 Answers
+ 6
Hello, Siddh Shah ! XHTML is not so different from the HTML 4.01 standard. The main differences: XHTML elements must be properly nested. XHTML elements must always be closed. XHTML elements must be in lowercase. XHTML documents must have one root element. Basically, XHTML is HTML (all html tags are in XHTML), which follows the rules of XML (because this is an XML family). Additional references can be found at: http://www.w3schools.com/html/html_xhtml.asp http://en.wikipedia.org/wiki/XHTML http://www.sitepoint.com/web-foundations/differences-html-xhtml/
4th Jul 2018, 6:49 PM
Alexander Sokolov
Alexander Sokolov - avatar
0
thanks
4th Jul 2018, 6:51 PM
Siddh Shah
Siddh Shah - avatar