+ 2

HTML v XHTML

HTML or XHTML. Which one is better?

16th Feb 2017, 11:14 PM
Murad Ali
Murad Ali - avatar
3 Answers
+ 3
I think XHTML is obsolete with HTML 5...
16th Feb 2017, 11:25 PM
Nifriz
Nifriz - avatar
+ 2
XHtml isn't just obsolete, it was completly abandonned, for benefits of Html5 coming out and development ^^ As suggested by @Grabriel Ruiz, XHtml is more strict than Html wich is more permissive ( XHtml is based on XML, based on SGML, and Html is directly based on SGML ), so XHtml is hardiest to write, and no more used: the question of knowing which one is better otherwise is no more relevant ;P
17th Feb 2017, 1:19 PM
visph
visph - avatar
+ 1
The differences below Document Structure XHTML DOCTYPE is mandatoryThe xmlns attribute in <html> is mandatory<html>, <head>, <title>, and <body> are mandatory XHTML Elements XHTML elements must be properly nestedXHTML elements must always be closedXHTML elements must be in lowercaseXHTML documents must have one root element XHTML Attributes Attribute names must be in lower caseAttribute values must be quotedAttribute minimization is forbidden
17th Feb 2017, 2:25 AM
Gabo Ruiz
Gabo Ruiz - avatar