In HTML, what attribute is required on a <form> to specify where to send data? The answer is action.
The action attribute identifies the URL or server-side endpoint that processes the form submission. When a user submits the form, the browser sends the form's name-value pairs to that destination.
The method attribute controls how the data is transmitted, usually with GET or POST. It does not identify the destination. The target attribute controls where the response is displayed, such as the same window or a new tab.
The enctype attribute specifies how the submitted data is encoded. It is especially important when forms upload files, but it also does not specify the receiving endpoint.
For example, <form action="/submit" method="post"> sends the submitted values to the /submit endpoint using the POST method. The action attribute can be omitted in modern HTML, in which case the form submits to the current document URL, but it is the attribute used to specify another destination.