About This HTML Issue
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
<form action="" method="post">
<label for="email">Email</label>
<input type="email" id="email" name="email">
<button type="submit">Subscribe</button>
</form>
Fixed by removing the action attribute
<form method="post">
<label for="email">Email</label>
<input type="email" id="email" name="email">
<button type="submit">Subscribe</button>
</form>
Find issues like this automatically
Rocket Validator scans thousands of pages in seconds, detecting HTML issues across your entire site.