Question about the difference between html and xhtml
Why do so many books and sites recommend XHTML over HTML,and what is the difference between html 4.01 and xhtml?
Why do so many books and sites recommend XHTML over HTML,and what is the difference between html 4.01 and xhtml?
HTML is a program from Standard Generalized Markup Language or SGML that lets the author to exclude some tags and employ reducing of attribute. While XHTML is a program from Extensible Markup Language or XML and it doesn't allow exclusion on some tags or to utilize the reducing of attribute.
Hi,
I am very pleased to answer your question regarding on the difference between xhtml and html 4.01. Here is the reason why xhtml is recommendable than html. Number one, it is cleaner. Because in html 4.01 there are numerous codes that could work although you did not follow exactly the html rules. In xhtml, elements should always be “closed”. Number two, every documents of xhtmp should always have “one root element”. Lastly, it is case sensitive. In xhtml you have to always use “lowercase”.
But I suggest you to learn HTML first because it is the basic, after you learned that, you will be able to learn XHTML much quicker and easier and you will distinguish its differences by yourself in the long run.
Thank you