website design software india
Home Contact Website Design/softwares Hosting Free Downloads/Softwares Free Templates Articles
Learn XHTML
Please note that if you find anything confusing , then We are always ready to design your XHTML website pages . We will Design XHTML website pages , Upload the XHTML pages to your website ( using FTP ) , Generate Google site map and submit the map . This will make your website available to Mobile Users . Needless to mention this is added Exposure . The cost is only $300 for a complete XHTML website . Or $15 per page if you find that cost effective . A few pages with most of your website major information can be covered here . contact us for XHTML Design . An example of our fast loading , informative , Few pages XHTML Website is here .


&nbsp XHTML and TAGS &nbsp




XHTML is the next generation of HTML, and today almost all the browsers are compatible to xhtml .

XHTML is not very different from HTML 4.01, so bringing your code up to 4.01 standards is a good solution .

In addition, you should start NOW to write your HTML code in lowercase letters, and NEVER make the bad habit of skipping end tags like the .

&nbsp Most Important differences:- &nbsp


  • XHTML elements must be properly nested
  • XHTML documents must be well-formed
  • Tag names must be in lowercase
  • All XHTML elements must be closed



Elements Must Be Properly Nested

In HTML some elements can be improperly nested within each other like this: &ltb&gt &lti&gt Bold and italic text &lt/b&gt &lt/i&gt


In XHTML all elements must be properly nested within each other like this: &ltb&gt &lti&gt Bold and italic text &lt/i&gt &lt/b&gt

A common mistake in nested lists, is to forget that the inside list must be within a li element, like :
&ltul&gt
&ltli&gt sugar &lt/li&gt
&ltli&gt Salt
&ltul&gt
&ltli&gt Iodised Salt &lt/li&gt
&ltli&gt Free flow Salt &lt/li&gt &lt/ul&gt
&lt/ul&gt


Documents Must Be Well-formed

All XHTML elements must be nested within the &lthtml&gt root element. All other elements can have sub (children) elements. Sub elements must be in pairs and correctly nested within their parent element. The basic document structure is:
&lthtml&gt
&lthead&gt ... &lt/head&gt
&ltbody&gt ... &lt/body&gt &lt/html&gt

Other tags like META , title and others have their own different positions and if used should be placed at correct location .


Tag Names Must Be In Lower Case

This is because XHTML documents are XML applications. XML is case-sensitive. Tags like <br> and
<BR> are interpreted as different tags.


This is wrong:


<BODY>
<P>This is a paragraph</P>
</BODY>


This is correct:

<body>
<p>This is a paragraph</p>
</body>


All XHTML Elements Must Be Closed

Non-empty elements must have an end tag.

This is wrong:
<p>This is a paragraph
<p>This is another paragraph


This is correct:
<p>This is a paragraph</p>
<p>This is another paragraph</p>

Empty Elements Must Also Be Closed

Empty elements must either have an end tag or the start tag must end with />. This is wrong:
This is a Line break<br>
This is a horizontal rule:<hr>
This is an image <img src="ok.gif" alt=" ok button" >


This is correct:
This is a horizontal rule:<hr />
This is an image <img src="ok.gif" alt="ok button" />


There are afew other compatibility issues that you should consider . Like you will have to add extra space at times in tags to make them XHTML . Like BR tag above .