StartTag: invalid element name

A < that does not start a valid element name.

The message, as the validator reports it
StartTag: invalid element name

Why it happens

  • A bare < in text: a < b. In XML text it must be escaped.
  • An element name that starts with a digit, a hyphen or a period: <1item>.
  • Characters not allowed in names, or a space right after <.

How to fix it

Escape a literal < in text as &lt; (or put the text in CDATA). Element names must start with a letter or _.

Example

Reports the error
<expr>a < b</expr>
Fixed
<expr>a &lt; b</expr>