Thanks for sharing.
SticKer
This is a discussion on Convert HTML to XHTML within the Web Design forums, part of the Web Designing & Development category; There are a few basic rules you need to apply to convert an HTML 4 document to XHTML. 1. Stricter ...
There are a few basic rules you need to apply to convert an HTML 4 document to XHTML.
1. Stricter adherence to the HTML specification.
Many browsers are very lax in how they interpret HTML. This leads to incongruities in how the pages are displayed, and XHTML doesn't allow that. The best way to correct this is to use an XHTML validator.
2. Write well formed documents.
What this generally means is avoiding overlapping elements. The following nested code is acceptable:
<p>Paragraph <em>emphasized</em></p>
because the <em> tag is opened and closed within the <p> tag. However, this is not allowed:
<p>Paragraph <em>emphasized</p></em>
because the <em> tag overlaps the <p> tag.
3. Write tags and attributes in lowercase.
XHTML is a case-sensitive markup language, so
<LI> and <li>
are potentially two different tags.
4. End tags are required.
In HTML, some tags which actually contain elements do not require the end tag. The most common of these is the
<p>
tag. XHTML requires that the
</p>
tag be used. For singleton tags, such as
<br>
you should include a trailing slash in the tag itself, e.g.
<br />
to get a line break.
5. Attributes must be quoted and include values.
What this means is that non-quoted attributes such as
<table border=3>
are invalid. And attributes which used to stand alone, must now be written as name="value" pairs. For example
<hr noshade="noshade" />
adds the noshade attribute to the <hr/> tag.
6. Do a second validation.
The last step is to validate your XHTML again. This will tell you of any additional problems or issues with your code.
Thanks for sharing.
SticKer
Buy / Sell / Trade Products and Services at our Webmaster Marketplace
61 Ways To Drive Targeted Traffic To Your Website
Yes, u r right and i also get best knowledge from one web site which name is w3schools.com u can get more information from there
Get Online Used Auto Finance, Bad Credit Auto Loans, Student Auto Loan and New Auto Financing online
Thanks for information. I'm interesded in #5
Attributes must be quoted and include values
You would be surprised at how many new sites I'm seeing put up by local designers that still use invalid HTML 4. XHTML has so many advantages over HTML.
I completely agree with you that xhtml is better than html.originally posted by Demtron.
You would be surprised at how many new sites I'm seeing put up by local designers that still use invalid HTML 4. XHTML has so many advantages over HTML.
I am just sharing that how can you convert html to xhtml...
Bookmarks