How to fix: Required attribute "action" not specified

Most Likely Cause and Fix

Your markup contains a <form> element that lacks the required action attribute:

<form … />

Add a suitable action attribute to each <form /> element where missing:

<form action="http://example.com/post/" …>

What This Error Means

There is a defined set of attributes for each HTML element. Some are required for your markup to be considered valid.

You have omitted the required action attribute on an element that requires it.

How To Fix It

The specific error message you encountered will refer to a line and column number. This will guide you to the exact point in your markup to which the error relates.

For forms

You've most likely forgotten to add an action attribute to a <form /> element:

<form … />

Add an action attribute to each <form /> element where missing:

<form action="http://example.com/post/" … />

In general

Find the relevant element and add the missing action attribute.

Discuss, Comment and Improve

Did this help you? Can this page be improved? Let us know!

comments powered by Disqus