Html vs XHTML
Html vs XHTML:
XHTML is nothing but an XML version of HTML. The abbreviation of XHTML is Extensible HyperText Markup Language. It is generally defined for XML programs and applications, it is supported by nearly all the famous web browsers.
XHTML is made by HTML developing team, which gives more power and flexibility to do things.
Following are some Mandatory things that need to follow in XHTML:
1. <!doctype…> is compulsory
Example:
<!DOCTYPE Here you need to declare the doctype">
<html>
<head>
<title>Welcome of doctype</title>
</head>
<body>
Welcome coders
</body>
</html>
2. Nesting should be done properly
Example:
<p><b>Hello folks</b></p> // This is correct
<p><b>Hello folks</p></b> // This is not correct
3. Everythings should be closed properly
Example:
<p>This is my name</p>
// This is correct
<i>This is my name // This is not correct
4. Attribute and elements should be in the small case
Example:
<a href="http://dreamzdevelopers.com/course/html-for-beginners/">Visit here to learn</a> // correct
<a HREF="http://dreamzdevelopers.com/course/html-for-beginners/">Visit here to learn</a> // incorrect
<A href="http://dreamzdevelopers.com/course/html-for-beginners/">Visit here to learn</a> // correct
<A href="http://dreamzdevelopers.com/course/html-for-beginners/">Visit here to learn</a> // correct
5. Quotation should be done properly
Example:
<a href="http://dreamzdevelopers.com/course/html-for-beginners/">Visit here to learn</a> // correct
<a href=http://dreamzdevelopers.com/course/html-for-beginners/>Visit here to learn</a> // correct
