XHTML Tutorial


XHTML References


Difference XHTML & HTML




Difference between XHTML and HTML?

XHTML every tag attributes write on marked up(Double Quotesion).
XHTML every element tag must be write in Nested.
XHTML every tags must be write in lowercase.
XHTML every tags must be closed.
XHTML document only one root element.

XHTML Tag attributes write on Marked Up(Double Quotesion)

Incorrect Code:

<img src=../jix/html.jpg width=128 height=128  >

XHTML correct Code

<img src="../jix/html.jpg" width="128" height="128" />

XHTML Element tag must be write in Nested.

Incorrect Code:

<p><b>This is a Paragraph line with Bold Style</p></b>

XHTML correct Code

<p><b>This is a Paragraph line with Bold Style</b></p>

XHTML every tags must be write in lowercase.

Incorrect Code:

<P>This is a Paragraph line.</P>
<LINK TYPE="TEXT/CSS" REL="STYLESHEET" HREF="jnj.css" />

XHTML correct Code

<p>This is a Paragraph line.</p>
<link type="text/css" rel="stylesheet" href="jnj.css" />

XHTML every tags must be closed.

Incorrect Code:

<LINK TYPE="TEXT/CSS" REL="STYLESHEET" HREF="jnj.css" >
<img src="../jix/html.jpg" width="128" height="128" >

XHTML correct Code

<link type="text/css" rel="stylesheet" href="jnj.css" />
<img src="../jix/html.jpg" width="128" height="128" />

XHTML document only one root element.

Every XHTML document only one root element like <html> start root element and end in last of XHTML document.

XHTML correct Code:

<html>
<head>
....
</head>
<body>
....
</body>
</html>