<![CDATA[

They have: 426 posts

Joined: Feb 2005

IS <![CDATA[ necessary for xhtml pages. For instance i have seen it when importing stylesheets and where javascipt starts and finishes

He has: 629 posts

Joined: May 2007

The short answer is No.

You will see this on correctly marked up XHTML that includes CSS rules or JavaScript code in the document. But this is bad practice. All CSS and JavaScript should be put in their own files, not polluting the (X)HTML. Much easier to maintain when you do this, too.

On another level, if you are sending your XHTML as type text/html then every browser on earth will apply HTML rules to your document, and XHTML-specific code such as this is treated as redundant.

A very different story if you intend to send it as XHTML or XML, though. Smiling

Cordially, David
--
delete from internet where user_agent="MSIE" and version < 8;

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.