Posted By

LeeRJohnson on 04/29/09


Tagged

template cdata


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

iroybot
vali29
LeeRJohnson
suzt808


Commented CDATA script and style tags


 / Published in: HTML
 

  1. <script type="text/javascript">
  2. //<![CDATA[
  3. alert('nice');
  4. //]]>
  5. <style type="text/css">
  6. /*<![CDATA[*/
  7. body{}
  8. /*]]>*/

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: Vordreller on April 29, 2009

So what does this do that's so special? Seriously, what reason is there to put this up?

Posted By: iroybot on June 27, 2009

if you generate your markup from XML data this is the way to code script and style blocks. if you leave away the comments the xslt processor might mess your code up.

You need to login to post a comment.