Skip to main content
HTML Validation

Saw a “form” start tag, but there was already an active “form” element. Nested forms are not allowed. Ignoring the tag.

About This HTML Issue

A <form> can't contain another <form>, so when the parser finds a second <form> start tag while one is still open, it drops that tag along with its action, method and id.

The fields inside the ignored form then belong to the outer one. In the invalid example below, the "Delete account" button submits the account form to /account, and nothing is ever sent to /account/delete. The inner </form> also closes the outer form early, so any fields after it end up outside any form, and the validator reports the last </form> as Stray end tag “form”.

A common cause is a page template that wraps the whole page in one form, with a search box or newsletter signup inside it that adds a form of its own. A missing </form> causes it too. If the parent element of the first form closes before the form does, the parser still treats that form as active, and it ignores the next <form> on the page.

Move the inner form out so the two forms are siblings. When a button or field has to stay inside one form's layout but submit a different form, give that form an id and point the control at it with the form attribute: <button type="submit" form="delete-account">. The <button>, <input>, <select> and <textarea> elements all accept form. The form it points to can sit anywhere in the document, and it can be empty, as in the valid example below.

Invalid example

<form action="/account" method="post">
  <label for="email">Email</label>
  <input type="email" id="email" name="email">
  <button type="submit">Save</button>

  <form action="/account/delete" method="post">
    <button type="submit">Delete account</button>
  </form>
</form>

Valid example

<form action="/account" method="post">
  <label for="email">Email</label>
  <input type="email" id="email" name="email">
  <button type="submit">Save</button>
  <button type="submit" form="delete-account">Delete account</button>
</form>

<form id="delete-account" action="/account/delete" method="post"></form>

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