HTML Guides for quotes
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 dir attribute on a <meta> element is set to an empty string, and dir only accepts ltr, rtl or auto.
dir is a global attribute, so <meta> may carry it. On a <meta> with human-readable content, such as a page description, it sets the direction of that text. An empty dir="" names no direction, so the validator rejects it. Remove the attribute if the text reads in the same direction as the page, or set rtl, ltr or auto if it doesn't.
Often nobody wrote that dir on purpose. A double quote inside the content value closes the attribute early, and the browser reads each word after it as a separate attribute with an empty value. If one of those words is "dir", you get this error, along with an "Attribute not allowed" error for each of the other words. A CMS or template that copies an excerpt into a description or og:description tag without escaping it produces exactly this. Write double quotes inside the value as ", or strip them before printing the tag.
Invalid example
<meta name="description" content="Opening hours and contact details" dir="">
Valid example
<meta name="description" content="Opening hours and contact details">
Invalid example with an unescaped quote
<meta name="description" content="How the "auto" value of the dir attribute picks a text direction">
Valid example with the quote escaped
<meta name="description" content="How the "auto" value of the dir attribute picks a text direction">
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