HTML Guides for location
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.
An empty action attribute on a <form> element is not valid HTML. To submit a form to the current page URL, remove the action attribute entirely.
When a <form> has no action attribute, the browser submits the form data to the URL of the current document. This is the same behavior most developers expect from action="", but the empty string is not a valid URL according to the HTML specification. The W3C validator flags this because the action attribute, when present, must contain a valid non-empty URL.
Removing the attribute is the correct fix. The HTML living standard explicitly states that omitting action causes the form to submit to the document's own URL.
HTML examples
Invalid empty action
<formaction=""method="post">
<labelfor="email">Email</label>
<inputtype="email"id="email"name="email">
<buttontype="submit">Subscribe</button>
</form>
Fixed by removing the action attribute
<formmethod="post">
<labelfor="email">Email</label>
<inputtype="email"id="email"name="email">
<buttontype="submit">Subscribe</button>
</form>
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.
Pro Trial
Full Pro access. Cancel anytime.
Start Pro Trial →Join teams across 40+ countries