XHTML Tips and Tricks for Bloggers. ~ The Blog Doctor.
Loading...

XHTML Tips and Tricks for Bloggers.

New Visitor? Like what you read? Then please subscribe to my Blog Feed or sign up for Free Email Updates. Thanks for Visiting!

The new blogger uses XHTML templates which are based on XML. Hence it is important for old bloggers switching to the new bloggers to see how different the new language is.......

TO CONVERT HTML TO XHTML you can use Tidy a utility from

http://sourceforge.net/projects/tidy

NOTE : When you download Full Template using the Download Full Template link under the Edit Html subtab of the Template tab it is saved to your PC as a XML file.


COMPARISON OF HTML AND XHTML
Came firstDeveloped later (ver2.0 July2006) and will replace HTML in the future.
Offers limited set of document-creation primitivesBackwardly compliant with HTML
Future compliant with XML

Incapable of handling non-traditional content like chemical formulae. musical notation etc

One of the reasons why XHTML based on XML was developed. XML has a large vocabulary to describe any kind of data.

Does not support new media like handhelds and mobliles.
Majority of HTML is completely compatible with XHTML

Future Proof with XML

Backwardly compliant with HTML.

End Tags may be left out in 4.01 StandardEvery tag must have a corresponding end tag. OR include a slash before closing bracket of tag to indicate its ending. Example <br />
Does not enforce strict nesting of elements.Strict Nesting of elements. Close the tags in the order they are opened.
Not case sensitive.Case Sensitive for all tag and attribute names. Example <a> and <A> are different tags. This is because XML is also case sensitive.

The Strict definition excludes all deprecated elements in HTML4.01
The Transitional definition includes the deprecated features of HTML and thus you can stay current while also being XML compliant.
The frames definition is similar to the Transitional and also includes frame elements.


Documents must be well formed.
Requires more attention in writing.
Enclose stylesheets/scripts in <style> </style>
Enclose stylesheets/scripts in CDATA sections like this <script language="javascript"> <![CDATA[...Javascript here...]]> </script>
Single quotes will do : <table rows='2'> Every attribute value should be enclosed in double quotes : <table rows="2">
Some attributes have no values : ismap
Every attribute must have a value. Those without values must use their own names. Thus ismap="ismap"
Majority of HTML is completely compatible with XHTML
Backwardly compliant with HTML

The Strict definition excludes all deprecated elements in HTML4.01
The Transitional definition includes the deprecated features of HTML and thus you can stay current while also being XML compliant.
The frames definition is similar to the Transitional and also includes frame elements.
Requires more attention in writing.
End Tags may be left out in 4.01 Standard Documents must be well formed.
<img src=seasonings.gif alt="Salt & pepper"> is valid HTML
Ampersand within an attribute value should always be written using "& a m p ;" and not simply an & character
<img src="seasonings.gif" alt="salt &a m p ; pepper" /> is valid XHTML

All XHTML elements must be nested within the root element. All other elements can have sub (children) elements. Sub elements must be in pairs and correctly nested within their parent element.







0 comments:

CLICK TO LEAVE A COMMENT..... :-)



Skip to top of post.

Search Blog Before Commenting

Loading...

Post a Comment

Please use the above search box to search this blog before posting your valuable comments.

Comments posted on Dummies Guide to Google Blogger (Beta) are moderated and will be approved only if they are on-topic and not abusive. Try not to include website URLs/links in your comments. You can email me : drbhatns at gmail dot com for any blogging question. Thanks,

Vin.

The Blog Doctor The Blog Doctor2 Blog Doctor Home

SUGGESTED READING

Tips On Blogger and Latest News.



Skip to top of post.