Ezilon.com - Target Your Audience, be Seen in Your Region

<![CDATA[

You are viewing this site as a guest. Join our community to get your questions answered and share knowledge. Active members may advertise and ask for a website critique.

They have: 282 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: 301 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
--
"Old web developers don't die, they degrade gracefully..."