+ 9
When should I choose XHTML over HTML5 and when vice versa?
I've seen both XHTML & HTML5 being used in modern times. W3C ( https://www.w3.org ) uses XHTML, and most modern websites use HTML5. I need some guidance on what to choose. Is there any specific reason I could prefer XHTML to HTML5? (Except not for HTML5 APIs) Any constructive advice is appreciated. Thanks in advance.
3 Respostas
+ 4
xhtml is also very useful if you need to parse your own website for some reason or want to make your website easily parsable by other people, because you can basically use a xml parser(but such problems are easily fixed by something like the tidy library)
+ 4
DAB Only as an annotation: your post is not OFF-TOPIC. You are asking a totally valid question for this space :)
+ 3
html 5 has new semantic (meaningful) elements that are important in order to best describe content ! header, footer, nav, main, article, section, aside....