What Is CDATA in HTML Documents?

Q

What Is CDATA in HTML documents?

✍: FYIcenter.com

A

CDATA stands for Character DATA, which is used to define a section of data that should not go through the XHTML entity translation (parsing) process. In other words, 3 special characters: "<", ">", and "&" can be directly used in CDATA. They will not be "parsed".

CDATA must starts with "<![CDATA[" and ends with "]]>". Here are some good examples:

  <![CDATA[Adam & Eve]]>
  <![CDATA[
    Sample XHTML code:
    <p>1</p>
    <p>1 1</p>
    <p>1 2 1</p>
    <p>1 3 3 1</p>
    <p>1 4 6 4 1</p>
  ]]>

 

Introduction of HTML Element Content Syntax

⇒⇒HTML Tutorials

2017-02-20, 184👍, 0💬