HTML v XHTML | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 2

HTML v XHTML

HTML or XHTML. Which one is better?

16th Feb 2017, 11:14 PM
Murad Ali
Murad Ali - avatar
3 Respostas
+ 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