XML is a markup language where documents must be marked up correctly and “well-formed”.

Today’s market consists of different browser technologies. Some browsers run on computers, and some browsers run on mobile phones or other small devices. Smaller devices often lack the resources or power to interpret a “bad” markup language.

Therefore – by combining the strengths of HTML and XML, XHTML was developed.

The Most Important Differences from HTML:

XHTML elements must be properly nested

XHTML elements must always be closed

XHTML elements must be in lowercase

XHTML documents must have one root element

XHTML Elements Must Be Properly Nested

In HTML, some elements can be improperly nested within each other, like this:

<b><i>This text is bold and italic</b></i>

In XHTML, all elements must be properly nested within each other, like this:

<b><i>This text is bold and italic</i></b>

Note: A common mistake with nested lists, is to forget that the inside list must be within <li> and </li> tags.

Note: The xmlns attribute in <html>, specifies the xml namespace for a document, and is required in XHTML documents.

XHTML Different Doctypes

The <!DOCTYPE> declaration is the very first thing in an XHTML document, before the <html> tag.

The <!DOCTYPE> declaration is not an XHTML tag; it is an instruction to the web browser about what version of the markup language the page is written in.

The <!DOCTYPE> declaration refers to a Document Type Definition (DTD). The DTD specifies the rules for the markup language, so that the browsers render the content correctly.

XHTML 1.0 Strict

This DTD contains all HTML elements and attributes, but does NOT INCLUDE presentational or deprecated elements (like font). Framesets are not allowed. The markup must also be written as well-formed XML.

2 Comments Already

I see a lot of interesting content on your page.
You have to spend a lot of time writing, i know how to save you a lot
of work, there is a tool that creates unique, google friendly
posts in couple of minutes, just type in google – laranita’s free content source

I was pretty pleased to uncover this website.
I want to to thank you for your time due to this fantastic read!!
I definitely loved every little bit of it and I have you bookmarked to look at new information on your website.