HTML Guides for port
Learn how to identify and fix common HTML validation errors flagged by the W3C Validator — so your pages are standards-compliant and render correctly across every browser. Also check our Accessibility Guides.
The URL in this link has a space in its port number, and a port can only contain digits.
In a URL such as https://example.com:8080/, the part after the colon that follows the host is the port. The URL Standard allows only digits there, up to the next /, ? or #. When the parser meets a space before that point, it gives up on the whole URL. A browser can't follow a link it can't parse, so clicking it does nothing.
The usual cause is a phone link written as http://tel: followed by a number with spaces between the digit groups, like http://tel:555 123 4567. The parser reads tel as a host name and the phone number as its port, then fails at the first space. Removing the spaces doesn't help. The link would point at a web server called tel, and most phone numbers are larger than 65535, the highest port allowed.
Phone links use the tel: scheme on its own, with no http:// in front, as defined in RFC 3966. A tel: URL can't contain spaces either, so write the digits together, starting with + and the country code. To keep the number easy to read, put the spaced version in the link text.
When the URL really has a port, the space is usually a typo or whitespace left by a template, as in https://example.com:8080 /reports. Delete it.
Invalid example
<p>Call us at <a href="http://tel:555 123 4567">555 123 4567</a>.</p>
<a href="https://example.com:8080 /reports">Open the reports</a>
Valid example
<p>Call us at <a href="tel:+15551234567">+1 555 123 4567</a>.</p>
<a href="https://example.com:8080/reports">Open the reports</a>
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
<a href="http://tel:5551234567">Call us</a>
<a href="https://example.com:80800/">Open the dashboard</a>
Valid example
<a href="tel:+15551234567">Call us</a>
<a href="https://example.com:8080/">Open the dashboard</a>
Validate at scale.
Ship accessible websites, faster.
Automated HTML & accessibility validation for large sites. Check thousands of pages against WCAG guidelines and W3C standards in minutes, not days.
1K Weekly
1,000 monthly checks. Cancel anytime.
Get 1K Weekly →Join teams across 40+ countries