Action normally specifies the file/page that the form is submitted to (using the method described in the method paramater (post, get etc.))

An action of # indicates that the form stays on the same page, simply suffixing the url with a #. Similar use occurs in anchors. <a href=#">Link</a> for example, will stay on the same page.

Thus, the form is submitted to the same page, which then processes the data etc.

Answer from MEURSAULT on Stack Overflow
🌐
W3Schools
w3schools.com › tags › att_form_action.asp
HTML form action Attribute
The action attribute specifies where to send the form-data when a form is submitted. ... If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail: sales@w3schools.com · If you want to report ...
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › HTML › Reference › Elements › form
The Form element - HTML - MDN Web Docs - Mozilla
November 3, 2025 - The <form> HTML element represents a document section containing interactive controls for submitting information. <form action="" method="get" class="form-example"> <div class="form-example"> <label for="name">Enter your name: </label> <input type="text" name="name" id="name" required /> </div> ...
🌐
W3Schools
w3schools.com › html › html_forms_attributes.asp
HTML Form Attributes
This chapter describes the different attributes for the HTML <form> element. The action attribute defines the action to be performed when the form is submitted.
🌐
Formspree
formspree.io › blog › html-form-action
A Mini Guide to HTML Form Action | Formspree
February 27, 2025 - This guide dives into the action ... web forms. The action attribute in an HTML <form> element specifies the endpoint where form data should be sent upon submission....
🌐
DotFactory
dofactory.com › html › form › action
HTML form action
The action attribute on a <form> tag specifies the form-handler that will process the submitted form data.
🌐
Programiz
programiz.com › html › form-action
HTML Form Action: POST and GET (With Examples)
<form method="post" action="www.programiz.com/user"> <label for="firstname">First name:</label> <input type="text" name="firstname" /><br /> <label for="lastname">Last name:</label> <input type="text" name="lastname" /><br /> <input type="submit" /> </form>
🌐
HTML Form Guide
html.form.guide › html-form › form-action-using-javascript-function
Setting the Form Action with a JavaScript Function | HTML Form Guide
In the above, we assign the passed in form reference to the form variable. Then we set its action attribute with form.action = "register.html". This will result in the form’s action getting set to BASE_URL/register.html. The BASE_URL will be the URL the HTML file is running on.
Find elsewhere
🌐
Career Karma
careerkarma.com › blog › html › html form action attribute: a how-to guide
HTML Form action Attribute: A How-To Guide | Career Karma
December 29, 2020 - The action attribute is used to ... page that will process the form. The HTML form action attribute states the URL that will process the contents of a form....
🌐
GeeksforGeeks
geeksforgeeks.org › html › html-action-attribute
HTML action Attribute - GeeksforGeeks
July 11, 2025 - The <form> element's action attribute is set to "/submit-form", indicating that when the form is submitted, the data will be sent to the /submit-form URL for processing. The method attribute is set to "post", specifying that the form data should ...
🌐
W3Schools
w3schools.com › tags › att_input_formaction.asp
HTML input formaction Attribute
<form action="/action_page.php"> <label for="fname">First name:</label> <input type="text" id="fname" name="fname"><br><br> <label for="lname">Last name:</label> <input type="text" id="lname" name="lname"><br><br> <input type="submit" value="Submit"> <input type="submit" formaction="/action_page2.php" value="Submit to another page"> </form> Try it Yourself »
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › API › HTMLInputElement › formAction
HTMLInputElement: formAction property - Web APIs | MDN
April 10, 2025 - The formAction property of the HTMLInputElement interface is the URL of the program that is executed on the server when the form that owns this control is submitted. It reflects the value of the <input>'s formaction attribute. This property is valid only for submit and image <input> elements.
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Learn_web_development › Extensions › Forms › Sending_and_retrieving_form_data
Sending form data - Learn web development | MDN
The server then responds, generally handling the data and loading the URL defined by the action attribute, causing a new page load (or a refresh of the existing page, if the action points to the same page). How the data is sent depends on the method attribute. The method attribute defines how data is sent. The HTTP protocol provides several ways to perform a request; HTML form data can be transmitted via a number of different methods, the most common being the GET method and the POST method
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › HTML › Element › form
The Form element - HTML: HyperText Markup Language | MDN
The <form> HTML element represents a document section containing interactive controls for submitting information. <form action="" method="get" class="form-example"> <div class="form-example"> <label for="name">Enter your name: </label> <input type="text" name="name" id="name" required /> </div> ...
🌐
HTML Form Guide
html.form.guide › action
Form Action | HTML Form Guide
HTML forms allow users to enter and submit data on a webpage. When a user clicks on the submit button, the form data is sent to the server using an HTTP request. The action attribute of the HTML form specifies the URL where the form data should be sent.
🌐
Herotofu
herotofu.com › terms › form-action
Understanding and Using the "Form action" Attribute in HTML Forms
The Form action attribute in HTML forms sets the destination for the form data upon submission. It can be used with both GET and POST methods, each having its distinct characteristics and use cases.
🌐
Universal Equations
uequations.com › us › html-form › 2023 › 02 › html-forms-action-attribute.html
The HTML Form’s Action Attribute | Universal Equations, Inc.
March 2, 2025 - The action attribute within a HTML form element specifies where to send the form data when a form is submitted.
🌐
W3Schools
w3schools.com › tags › att_button_formaction.asp
HTML button formaction Attribute
A form with two submit buttons. The first submit button submits the form data to "action_page.php", and the second submits to "action_page2.php":
🌐
freeCodeCamp
forum.freecodecamp.org › html-css
HTML lesson 35- Form action assistance - HTML-CSS - The freeCodeCamp Forum
September 16, 2022 - Step 35 The action attribute indicates where form data should be sent. For example, <form action="/submit-url"></form> tells the browser that the form data should be sent to the path /submit-url. Add an action attribute…
🌐
Reddit
reddit.com › r/html › what is mean? i find it confusing. my question involves python flask but you don't need to understand very much of python or flask.
r/HTML on Reddit: What is <form action => mean? I find it confusing. My question involves python flask but you don't need to understand very much of python or flask.
September 24, 2021 -

new_post.html

<form action="/post/new" method="Post">
to the website_names/post.new route.

If I am not mistaken the action form accepts the data from the website_name/post/new in the example above.

new_post.html

<form action " " method="Post">

What do the double empty quotes mean? Does it just fill in the form depending on the route?

My next question is imagine I have 2 routes in python flask that sends data to new_post.html.

The 2 routes in python flask are "post/new" and "/post/edit/<int:post_id>".

If I include the first example of new_post.hmtl could this lead to 500 error if I use the "/post/edit/<int:post_id>" ?

Should I ask this in the flask sub reddit or is here okay?