What Is PCDATA in HTML Documents?

Q

What Is PCDATA in HTML Documents?

✍: FYIcenter.com

A

PCDATA stands for Parsed Character DATA. Here are some basic rules about PCDATA:

  • PCDATA is a string of characters and HTML entities.
  • HTML entities are escape sequences used to refer to special characters that are not so easy to enter them in a text document. For example, "©" is HTML entity referring to the copyright character: "©".
  • 3 special characters: "<", ">", and "&" can not be used directly in PCDATA. They must be replaced by the corresponding HTML entities: "&lt;", "&gt;", and "&amp;".
  • If "<" is used in PCDATA, it will be parsed as the beginning of a HTML tag.
  • If "&" is used in PCDATA, it will be parsed as the beginning of a HTML entity.

Below you will see some good examples of PCDATA:

  c FYICENTER
  &copy; FYICENTER
  &copy; &#70;&#89;&#73;&#67;&#69;&#78;&#84;&#69;&#82;

 

HTML Entities

HTML Elements with Mixed Contents

Introduction of HTML Element Content Syntax

⇑⇑ HTML Tutorials

2024-06-28, 1699🔥, 1💬