When using XHTML, the contents of
<style> elements must be marked as CDATA. This is essential when serving XHTML correctly (as
When possible, use external script and style files and reference these from your XHTML document (behavioural and presentational separation). However, the examples below show how to place
<style> inside your XHTML document correctly. This method should be compatible with older browsers, and therefore degrades gracefully.
<script> as CDATA:
<style> as CDATA:
<style type="text/css"> <!--/*--><![CDATA[/*><!-- */ ...... /*]]>*/--> </style>
If you are serving ASP.NET pages as