HTML vs XHTML

HTML & XHTML 
XHTML is extensible hypet text mark up language. XHTML is almost similar to HTML. But XHTML is stricter than HTML. XHTML is supported by almost all the major browsers.
Usually web sites can contain bad html. But in most of the browsers the code works properly. But take the case of mobiles or other small devices which use internet. When we try to open those pages in such devices that can show some errors. i.e
Smaller devices may not be able to intercept such bad codes.
To avoid this problem XHTML was introduced. XHTML is a combination of HTML + XML.
XML is a mark up language  where documents must be marked up correctly.

Differences from HTML
In XHTML DOCTYPE is mandatory.
<html>,<head>,<body> and <title> tags are mandatory.
XHTML elements must be properly nested i.e there must be start tag and end tag for all elements.
XHTML elements must be in lowercase .
Attributes must be in lowercase.
Attribute values must be quoted.

0 Comment "HTML vs XHTML "