# Bad value X for attribute “href” on element “a”: Port number must be less than 65536.

> Canonical HTML version: https://rocketvalidator.com/html-validation/bad-value-x-for-attribute-href-on-element-a-port-number-must-be-less-than-65536
> Attribution: Rocket Validator (https://rocketvalidator.com)
> License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

The URL in this link has a port number above 65535, the largest value a network port can have.

In a URL such as `https://example.com:8080/`, the digits after the colon that follows the host are the port. Ports are 16-bit numbers, so the URL Standard rejects any port greater than 65535. A browser can't parse a URL like that, and clicking the link does nothing.

The usual cause is a phone link written as `http://tel:` followed by the number. The URL parser reads `tel` as a host name and the phone number as its port, and almost every phone number is larger than 65535. Phone links use the `tel:` scheme on its own, with no `http://` in front, as defined in RFC 3966.

A short number doesn't make `http://tel:` correct. `http://tel:12345` passes validation because 12345 is a valid port, but the link points at a web server called `tel` instead of dialing. A number containing `+` or `-` gets a different error, `Illegal character in port`. Whatever the validator says, drop the `http://` from phone links.

When the URL really is meant to carry a port, check the digits for a typo: valid ports go from 0 to 65535.

## Invalid example

```html
<a href="http://tel:5551234567">Call us</a>

<a href="https://example.com:80800/">Open the dashboard</a>
```

## Valid example

```html
<a href="tel:+15551234567">Call us</a>

<a href="https://example.com:8080/">Open the dashboard</a>
```
