# StartTag: invalid element name

Source: https://xmlvalid.com/errors/starttag-invalid-element-name

> A &lt; that does not start a valid element name.

Example message: `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 that fails

```xml
<expr>a < b</expr>
```

## Fixed

```xml
<expr>a &lt; b</expr>
```
