Invalid HTML: explanation

Common causes for this condition:

  • Placing plain text in an element intended to be rendered as HTML. Example: representing a less than sign ("<") as escaped HTML requires the following code: &amp;lt;
  • Use of non-HTML tags.
  • Arbitrary truncation of HTML, possibly in the middle of a tag.
  • Unmatched quotes in attribute values, or missing whitespace between attributes
  • For Atom feeds: declaring the type as xhtml, but not changing the default namespace from atom's to xhtml's.

For elements intended to be rendered as HTML, like RSS description, make sure that all plain text content is escaped first as HTML and then again as XML.

For Atom text constructs, you can use the type attribute to declare your intented usage: plain text, escaped html or in-line xhtml.