Posted on May 27, 2014, 8:30 am by about-dev.com
The first two posts of this category where about HTML and XHTML and I consider is necesary to underline the main differences between these two web technologies.
So, I found these differences at syntax level and behavioral level:
1. HTML uses pseudo-SGML syntax, while XHTML uses a XML syntax.
2. XHTML requires that we follow the XML syntax rules (see them here).
3. Shorthand minimization of attributes and elements is not allowed anymore in XHTML, while in HTML we could use it.
HTML attribute shorthand: attributeName
4. Behavior on parse error differe from HTML to XHTML: a fatal parse error in XML (an incorrect tag structure) causes document processing to be aborted.
5. HTML doesn't know to work with namespaces, while XHTML does.
- CSS selectors are case-sensitive
The list remains open, because things in web are changing wery fast :).