# “<” in attribute name. Probable cause: “>” missing immediately before.

> Canonical HTML version: https://rocketvalidator.com/html-validation/in-attribute-name-probable-cause-missing-immediately-before
> Attribution: Rocket Validator (https://rocketvalidator.com)
> License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

A `<` character appearing where an attribute name is expected typically means a closing `>` is missing on the previous tag, causing the browser to interpret the next tag as an attribute.

This error occurs when you forget to close an HTML element's opening tag with `>`. The validator sees the `<` of the next element and thinks it's still parsing attributes of the previous element. It's a common typo that can cascade into multiple confusing errors.

For example, if you write `<div` without the closing `>`, the following `<p>` tag gets parsed as if it were an attribute of the `div`, triggering this error.

## HTML Examples

### ❌ Incorrect

```html
<div class="container"
  <p>Hello, world!</p>
</div>
```

The `<div>` tag is missing its closing `>` after `"container"`, so the validator sees `<p>` as part of the `div`'s attribute list.

### ✅ Correct

```html
<div class="container">
  <p>Hello, world!</p>
</div>
```

Make sure every opening tag is properly closed with `>`. If the error points to a specific line, check the tag immediately **before** that line for a missing `>`.
