# Bad value X for attribute “href” on element “a”: Illegal character in path segment. “>” is not allowed.

> Canonical HTML version: https://rocketvalidator.com/html-validation/bad-value-x-for-attribute-href-on-element-a-illegal-character-in-path-segment-greater-than-is-not-allowed
> Attribution: Rocket Validator (https://rocketvalidator.com)
> License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

The `href` value on the `<a>` element contains a literal `>` character, which is not allowed in a URL path.

The URL standard does not allow a raw `>` anywhere in a URL. Writing it as `&gt;` doesn't change that, because the HTML parser decodes `&gt;` back to `>` before the URL is read. Browsers still follow the link, but they percent-encode the character themselves and request a path that usually does not exist.

When the value starts with `>`, it is often not an address at all. Some sites put a `>` in front of link text as a small arrow, as in `> Read the full report`. If an editor pastes that text into the URL field of a CMS instead of the label field, the whole sentence becomes the `href`, and the browser treats it as a relative path to a missing page. A stray `>` at the end of a value, like `href="https://rocketvalidator.com/reports/annual>"`, is usually a typo in the markup.

Put the real address in `href` and keep the text inside the element. The validator reports only the first illegal character in a value, so if you remove the `>` but leave the sentence in `href`, it will report the spaces next. If a path really needs a `>`, write it as `%3E`.

## Invalid example

```html
<a href="&gt; Read the full report">Read the full report</a>
```

## Valid example

```html
<a href="/reports/annual">Read the full report</a>
```
