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
🌐
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
It's the method the browser uses to talk to the server when asking for a response that takes into account the data provided in the body of the HTTP request: "Hey server, take a look at this data and send me back an appropriate result." If a form is sent using this method, the data is appended ...
🌐
W3Schools
w3schools.com › tags › att_form_method.asp
HTML form method Attribute
<form action="/action_page.php" method="post"> <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"> </form> Try it Yourself »
🌐
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>
🌐
Formspree
formspree.io › blog › html-form-action
A Mini Guide to HTML Form Action | Formspree
February 27, 2025 - When the form action attribute is omitted in an HTML form, the browser defaults to submitting the form data to the same URL as the current web page. This behavior is often used in self-contained applications where the server processes and responds to the submitted data directly. ... <form method="POST"> <label for="name">Name:</label> <input type="text" id="name" name="name"> <input type="submit" value="Submit"> </form>
🌐
HTML.com
html.com › attributes › form-method
What Form Method Tells Your Web Browser In HTML
November 3, 2019 - <form action="fileupload.php" method="post" enctype="multipart/form-data"> <p>Please select the file you would like to upload.
🌐
Herotofu
herotofu.com › terms › form-action
Understanding and Using the "Form action" Attribute in HTML Forms
The "Form action" attribute is a critical component in HTML forms, serving as the destination for the form data upon submission. It specifies the URL of a web page or a server-side script, such as a PHP file, that will process the form data. The action attribute can be used with both the GET ...
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › HTML › Reference › Elements › form
The Form element - HTML - MDN Web Docs - Mozilla
post: The POST method; form data sent as the request body. get (default): The GET; form data appended to the action URL with a ?
Find elsewhere
🌐
PHP
php.net › manual › en › tutorial.forms.php
PHP: Dealing with Forms - Manual
It is a straight HTML form with no special tags of any kind. When the user fills in this form and hits the submit button, the action.php page is called. In this file you would write something like this: ... Hi <?php echo htmlspecialchars($_...
🌐
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?

🌐
Svelte
svelte.dev › docs › kit › form-actions
Form actions • SvelteKit Docs
If someone were to click the button, the browser would send the form data via POST request to the server, running the default action.
🌐
W3Schools
w3schools.com › tags › att_form_action.asp
HTML form action Attribute
<form action="/action_page.php" method="get"> <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"> </form> Try it Yourself »
🌐
W3Schools
w3schools.com › php › php_forms.asp
PHP Form Handling
This array holds key/value pairs, where keys are the names of the form controls and values are the input data from the user. Both GET and POST are treated as $_GET and $_POST.
🌐
Medium
medium.com › @kathrynlael › html-forms-post-method-and-search-e2d4ff92abbe
HTML Forms Post Method and Search | by Kathryn Clark | Medium
May 9, 2020 - POST request is to create a new instance of your class (this will make more sense later on).The GET request is essentially retrieving a webpage, which will be used later in my Search form.
🌐
Quora
quora.com › What-does-form-action-some_url-method-POST-really-mean
What does <form action="some_url" method = POST> really mean?
Beside python the URL show the destination for the ‘POSTED’ information from that form. method=”POST” hides the data so that no one can see that data from the address bar of the browser and steals the vital info. There are various other ways to do that. I’ll conclude it by saying that <form action="destination" method = POST>, action specifies the destination for the provided data to the form and POST hides it from address bar of browser.
🌐
GeeksforGeeks
geeksforgeeks.org › html › html-form-method-attribute
HTML <form> method Attribute - GeeksforGeeks
July 12, 2025 - This method sends the form-data as an HTTP post-transaction. ... <!DOCTYPE html> <html> <head> <title> HTML form method Attribute </title> </head> <body style="text-align:center;"> <h1 style="color:green;">GeeksforGeeks</h1> <h3>HTML <form> ...
🌐
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 - By default, the method attribute is set to “get”. This means that your form will send data over an HTTP GET request when it is submitted. You can change the method by specifying “method=’post'” in your opening <form> tag.
🌐
FormSubmit
formsubmit.co
FormSubmit | Easy to use form backend - form endpoints for your HTML forms
<form action="https://formsubmit.co/[email protected]" method="POST" /> Include a · name attribute in all form elements (i.e. <input>, <select>, and <textarea>) to receive the submission data. <input type="email" name="email"> Submit the form once. This first-time-use will trigger an email requesting confirmation.
🌐
LaunchCode
education.launchcode.org › intro-to-web-dev-curriculum › user-input-with-forms › reading › post-form-submission › index.html
POST Form Submission :: Introduction to Web Dev
May 25, 2023 - Form handlers are web server actions ... to use form handlers that have already been created for us. ... When submitted, this form will send a POST request to the form handler defined by the action attribute....
🌐
SoftUni
softuni.org › home › news › dev concepts › handling an html form – get and post methods, and data encoding [dev concepts #38]
Handling an HTML Form – GET and POST Methods, and Data Encoding [Dev Concepts #38] - SoftUni Global
June 30, 2022 - The user fills out the input fields ... the server with a script for processing input data. You add an action attribute to the form to define where the submitted data goes....