- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
When is a CDATA section necessary within a script tag?
To avoid parsing the symbols <> &, it is added in <script>…</script>. It is not needed in HTML. Let us see how CDATA is added in <script> tags:
<script> //<![CDATA[ document.write(">"); //]]> </script>
Note: CDATA is now deprecated. Do not use.
The CDATA Section interface is used within XML for including extended portions of text. This text is unescaped text, like < and & symbols. These symbols do not want to escape.
It is used like this:
<![CDATA[ ... ]]>
Advertisements