Fandom

HTML & CSS Wiki

Character data

649pages on
this wiki
Add New Page
Comments0 Share

Character data (also known as CDATA) is a special form of textual data. In HTML and XML, it is used both for attribute values and as textual content of elements. User agents process text in the form of character data in the following way:

  • Character entities are replaced with their corresponding characters.
  • Carriage returns and tab characters are each replaced with a single space.
  • Leading and trailing white space may be ignored (decision is up to the user agent).

For example, the CDATA "éé twee   drie" is interpreted as "één twee drie".

Script and style content

Even thought the HTML 4 specification defines <script> and <style> content as CDATA, it really is treated as raw text, meaning that white space and character entities are maintained as they are. The first occurrence of the sequence </ is treated as the end of the content.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.