What exactly is CDATA and what does it do?

前端 未结 4 502
予麋鹿
予麋鹿 2021-01-04 08:58

I sometimes notice a CSS or JS code surrounded with and ]]> tags. I couldn\'t find any explanation to this. What does CDATA do? Why

4条回答
  •  旧巷少年郎
    2021-01-04 09:20

    It marks data that shouldn't be parsed - in most cases, just HTML or text that needs to be written directly to the page.

    Further explanation: http://www.w3schools.com/xml/xml_cdata.asp

提交回复
热议问题