Skip to main content
HTML Validation

Bad value X for attribute “content” on element “meta”: Expected a space character, but saw Y instead.

About This HTML Issue

The content value of a <meta http-equiv="refresh"> tag needs at least one space between the semicolon and URL=, as in 0; URL=https://example.com/.

For a refresh, the HTML standard defines content as a number of seconds, optionally followed by a semicolon, one or more spaces, URL= and the address to load. The validator reads the delay, finds the semicolon and expects whitespace next. Whatever character it finds instead ends up in the message: usually U or u, or the first character of the address when URL= is missing as well.

Browsers are more lenient and follow 0;URL=... anyway, so the redirect works despite the error. Adding a space after the semicolon fixes it, along with URL= if the value doesn't have one. URL is case-insensitive, so url= passes too, but don't wrap the address in quotes.

It's also worth checking whether the page needs the tag at all. An automatic refresh or a delayed redirect changes the page without the user asking for it, which WCAG flags under 2.2.1 (Timing Adjustable) and 3.2.5 (Change on Request). A 0-second redirect avoids the timing problem. Still, when a page has moved for good, a server-side 301 redirect is better, because the browser follows it before loading any HTML.

Invalid example

<meta http-equiv="refresh" content="0;URL=https://example.com/">

Valid example

<meta http-equiv="refresh" content="0; URL=https://example.com/">

Find issues like this automatically

Rocket Validator scans thousands of pages in seconds, detecting HTML issues across your entire site.

Help us improve our guides

Was this guide helpful?
🌍 Trusted by teams worldwide

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.

Scheduled Reports
API Access
Open Source Standards
€5 / week

1K Weekly

1,000 monthly checks. Cancel anytime.

Get 1K Weekly →

Join teams across 40+ countries