How to Link Submit Button to Another Page in HTML [Updated]

Link Submit button to Another Page using forms Tags in HTML, Using HTML’s Form tag we can Link submit Button to a different page using HTML Form’s Action Attribute.
Where we have to Declare/Write the Submit button Between HTML Form Tags and we have to assign our File Path (myPage.html or PHP) inside HTML form’s action attribute.
Later when the user clicks the Form Button, It will redirect that user to another page.

index.html

<html>
  <head>
    <title>Video in HTML</title>
  </head>    
  <body>    
    <form method="POST" action="myPage.php">
      <input type="submit"/>
    </form>    
  </body>    
</html>
Youtube: How to Link Submit Button to Another Page in HTML [Updated]
Play Youtube Video

Link Submit button using Anchor Tags in HTML

Linking Submit buttons using Anchor Tag is Easy and Reliable method in HTML. We need to Write/Declare Submit button between Anchor tag’s Starting and Closing tags.
By using Anchor tag’s href attribute we can give a Path where we want to Link our Submit Button.

index.html

<html>    
  <body> 
    
    <a href="http://programminghead.com">
      <input type="submit"/>
    </a>
    
  </body>    
</html>

Link Submit button to Another page using JavaScript

If you don’t need to use Form tag or Ancher tags to Link Submit button to a different page in HTML then we can use JavaScript for such cases. In JavaScript, we design a Function which will manage all the Data like Page Path where we want to Connect our Submit Button. The function name, By using that Function name we can call that function within HTML onClick attribute. Which we call the assigned function and we can redirect our users from one page to another by clicking on the Submit Button.

index.html

<html>    
  <body> 
    
    <input type="submit" onClick="myFunction()"/>
    <script>
      function myFunction() {
        window.location.href="http://programminghead.com";
      }
    </script>
    
  </body>    
</html>
How to Link Submit Button to Another Page in HTML [Updated]

How to make a button link to another page in HTML

To link a button to another page in HTML, we can use 2 Different methods.

Make a Button link to another page using Anchor tags.

index.html

<html>    
  <body> 
     
    <a href="http://programminghead.com">
      <input type="submit"/>
    </a>
    
  </body>    
</html>

Make a Button link to another page using JavaScript.

index.html

<html>
    
  <body> 
    
    <button id="myBtn"/>
    <script>
      document.getElementById("myBtn").addEventListener("click", myFunction);
      function myFunction() {
        window.location.href="http://programminghead.com";
      }
    </script>
    
  </body>
</html>

FAQs about: How to Link Submit Button in HTML

Submit button redirect to another page HTML

To redirect users to another page using Submit button we can use HTML’s Ancher tag or Form tags for that.
In Anchor tags and Form Tags, we need to Write/Declare our Submit button between Anchor tags or Form Tags."
Which will make our Submit button Clickable. And by using Anchor and Form tag’s href attribute we can Specify the Path where we want our users to redirect after clicking the Submit Button.
Redirect using HTML Form Tags.

index.html

<html>
  <body> 
    
    <form action="nextpage.php" method="POST">
      <input type="submit"/>
    </form>
    
  </body>
</html>

Redirect using HTML Anchor Tags

index.html

<html>
  <body> 
    
    <a href="http://programminghead.com">
     <button>Click Me</button>
    </a>
    
  </body>    
</html>

How to link one page to another page in html using button

To link one page to another page in HTML using the buttons we can use HTML Anchor tags.
where we need to declare/Write HTML Button between Anchor tag's starting and ending tags.
(<a href=""><button>My Button</button></a>) Where inside HTML anchor tag's href="" we have to give our another page's path, where we want to link our webpage.
(<a href="another.html"><button>My Button</button></a>).

CODE : how to link one page to another page in html using button

index.html

<html>
  <body> 
    
    <a href="anotherpage.html">
      <button>My Button</button>
    </a>
    
  </body>
</html>

How to link submit button to another page in php

The Process of linking Submit button to another page in PHP is very Similar to HTML.
Because we can use HTML Elements inside PHP Document and Submit buttons are usually created using HTML Tags.
So using HTML Anchor tags or HTML Form Tags we can link submit button to another page in PHP.
Redirect using HTML Anchor Tags.

index.php [Redirect using HTML Anchor Tags]

<html>
  <body> 
    
    <a href="http://programminghead.com">
      <input type="submit"/>
    </a>
    
  </body>
</html>

index.php [Redirect using HTML Form Tags]

<html>
  <body> 
    
    <form action="nextpage.php" method="POST">
      <input type="submit"/>
    </form>
    
  </body>
</html>

Input Type Submit Link to Another Page

To make input type submit link to another page, we can use HTML Anchor Tags or HTML Form Tags to Do that.
To Link HTML Input type submit Button to another page in HTML using HTML Anchor tags, we have to declare/write our HTML input type submit button between Anchor Tag's Starting and Closing Tags. In HTML Anchor tag's href attribute, we have to give our Another Web page's link (Where we want to Link out Input type submit Button).
To Link HTML Input type submit to another page using HTML Form tags, we have to declare/write our HTML input type submit button between HTML Form Tag's Starting and Closing Tags. In HTML Form tag's Action attribute, we have to give our Another Web page's link (Where we want to Link out Input type submit Button).

index.html

<html>
  <body> 
     
    <a href="http://programminghead.com">
      <input type="submit"/>
    </a>
     
    <form action="nextpage.php" method="POST">
      <input type="submit"/>
    </form>
    
  </body>
</html>

How to make a button or a page link to another page in HTML using the button

Just write/Declare your HTML Button inside HTML Anchor tags . Anchor tags will make our HTML Buttons Clickable and after that, you can use Anchor tag’s href attribute to give the Path to your Button.

index.html

<html>
  <body> 
    
    <a href="http://programminghead.com">
      <button>Click Me</button>
    </a>
    
  </body>
</html>

How to handle multiple submit buttons in HTML forms

In HTML Forms all the Buttons inside Form Tags will work like a Submit button. Which will redirect users to the same page (Which we have declared inside HTML form’s action attribute) If you want to Handle multiple Submit buttons then you can use Multiple Form tags with multiple Page Path. or you can use Anchor tags instead of Form tags to redirect Users using multiple submit buttons in HTML link submit button to another page using JavaScript.

index.html

<html>
  <body> 
    
    <input type="submit" id="submitBtn"/>
    <script>
      document.getElementById("submitBtn").addEventListener("click", myFunction);
      function myFunction() {
        window.location.href="http://programminghead.com";
      }
    </script>
  </body>
</html>

JavaScript windows.location allows us to redirect our users to another page on a single click. We just need to add a Click event inside our JavaScript. Which will run when user Invoke the Click Event by clicking the Submit button.

A href Submit form onclick

Yes you can Link / Open another page using HTML Anchor Tags / A Href Method. For that you have to provide your Another page’s Link inside Anchor tags href attribute. Which will open your Linked page on a Single Click.

index.html

<html>
  <body> 
    
    <a href="myNextPage.html">
      Click Me 
    </a>
    
  </body>
</html>

Redirect to another page after form submit html

If you want to redirect to another page after form submit html, Then you have to provide/Sign the Other pages path inside HTML Form tag’s ACTION Attribute. Which will POST/Send your Form data to that Location and Open/Redirect your Users to That Given Web Page.

index.html

<html>
  <body> 
    
    <form method="POST" action="anotherPage.php">
     <input type="text"/>
     <input type="submit"/>
    </form>
    
  </body>
</html>

On submit go to another page in html

If you want your Users go to another page in HTML, we can use HTML Anchor tags. Which allow us to make HTML Elements like Submit Button Click Able and Linked with Another Pages.
So whenever our User will click the Submit button, Anchor tags will redirect that user to another page (Which page we specify inside Anchor tag's href attribute).

index.html

<html>
  <body> 
    
    <a href="anotherPage.html">
      <input type="submit"/>
    </a>
    
  </body>
</html>

Html form submit button link to another page

To make HTML form submit button link to another page, we have to use HTML's Form tags or HTML Anchor Tags.
HTML Anchor is used for linking HTML Elements to Another Page. Where a user can be redirected to a page using a single button click.
In HTML Anchor tags we have to use its href attribute to write external file path (where we want to redirect our Users).
And
HTML Form tags allow us to Show Form data and also allow us to link that Form data to another page using HTML Form tag's Action Attribute.
This method is Basically used for POSTING and Getting HTML Form Data using PHP but we also can use this Method to Link our Submit button to another Page.

index.html

<html>
  <body> 
     
    
    <a href="anotherPage.html">
      <input type="submit"/>
    </a>
     
    
    <form method="POST" action="anotherPage.php">
      <input type="submit"/>
    </form>
    
  </body>
</html>

HTML submit button redirect to another page

To make HTML submit button redirect to another page, we have to use HTML's Form tags or HTML Anchor Tags.
HTML Form tags allow us to Show Form data and also allow us to submit that Form data to another page using HTML Form tag's Action Attribute.
And
HTML Anchor can link any HTML Element to Another Page. Where a user can be redirected to a page using a single button click.
In HTML Anchor tags we have to use its href attribute to write external file path (where we want to redirect our Users).

index.html

<html>
  <body> 
    
    
    <form method="POST" action="anotherPage.php">
      <input type="submit" value="form link Button"/>
    </form>
     
    
    <a href="anotherPage.html">
      <input type="submit" value="Anchor Link Button"/>
    </a>
  </body>
</html>

HTML form submit to another page

To make HTML form data submit to another page, we have to use HTML's Form tags.
HTML Form tags allow us to Show Form data and also allow us to submit that Form data to another page using HTML Form tag's Action Attribute.
We are using PHP file to POST and Show our HTML Form Data.

index.html

<html>
  <body>
    <form method="POST" action="anotherPage.php">
      <input type="text" name="myData"/>

      <input type="submit"/>
</form></body>
</html>

anotherPage.php

<?php
  echo "Your Data is :";
  echo $_POST['myData'];
?>

Submit button with link in html

To add an submit button with link in HTML, we need to use HTML's Anchor tags. Which allow us to Add links or making HTML Elements Clickable / Linked with another Page.
To add links to am HTML Submit Button, Write that Submit button between Anchor tag's Starting and Closing tags.
and using Anchot Tag's href Attribute, we can write our HTML File's Path (Where we want to link our HTML Submit Button).

index.html

<html>    
  <body> 
    
    <form method="POST" action="anotherPage.php">
      <input type="submit" value="link Button using Form"/>
    </form>
     
    <a href="anotherPage.html">
      <input type="submit" value="Link Button using Anchor"/>
    </a>
  </body>
</html>

or you can use JQuery Ajax which can redirct you to another page after Form Data Submission. Click Here to Download JQuery Library.

Submit button redirect to another page html

To make submit Button Redirect to Another page in HTML we have two Methods.
First : By using HTML Anchor Tags.

index.html

<a href="anotherPageLink.html">
  <button>Submit Button</button>
</a>

and by using HTML Form tag's Action Attribute

index.html

<form action="anotherPageLink.html">
  <input type="submit">
</form>

Button link to another page

To make submit Button Redirect to Another page in HTML use HTML Anchor Tags.

index.html

<a href="anotherPageLink.html">
  <button>Submit Button</button>
</a>

PHP button link to another page

To make php button link to another page we have two Methods.
First : By using HTML Anchor Tags.

index.php

<a href="anotherPageLink.html">
  <button>Submit Button</button>
</a>

and by using HTML Form tag's Action Attribute

index.php

<form action="anotherPageLink.php">
  <input type="submit">
</form>

Button link to another page

To make submit Button Redirect to Another page in HTML use HTML Anchor Tags.

index.html

<a href="anotherPageLink.html">
  <button>Submit Button</button>
</a>

PHP button to another page

To make php button to another page we have two Methods.
First : By using HTML Anchor Tags.

index.php

<a href="anotherPageLink.html">
  <button>Submit Button</button>
</a>

and by using HTML Form tag's Action Attribute.

index.php

<form action="anotherPageLink.php">
  <input type="submit">
</form>

Input type submit redirect to another page

To make input type submit redirect to another page we have to use HTML Form Tags inside our PHP File.
by using HTML Form tag's Action Attribute.

index.html

<form action="anotherPageLink.php">
  <input type="submit">
</form>

PHP button link

To make php button link we have to use HTML Anchor Tags.

index.php

<a href="anotherPageLink.php">
  <button>Submit Button</button>
</a>

HTML form submit button link to another page in HTML

To make html form submit button link to another page we have to use HTML Form Tags, and we will link our submit button to another page by using HTML Form tag's Action Attribute.

index.html

<form action="anotherPageLink.html">
  <input type="submit">
</form>

How to make a button go to another page

To make a button go to another page in HTML we have two Methods.

First : By using HTML Anchor Tags.

index.html

<a href="anotherPageLink.html">
  <button>Submit Button</button>
</a>

and by using HTML Form tag's Action Attribute.

index.html

<form action="anotherPageLink.html">
  <input type="submit">
</form>

How to make a submit button redirect to another page in html

To make a submit button redirect to another page in html we have two Methods.

First : By using HTML Anchor Tags.

index.html

<a href="anotherPageLink.html">
  <button>Submit Button</button>
</a>

and by using HTML Form tag's Action Attribute.

index.html

<form action="anotherPageLink.html">
  <input type="submit">
</form>

A href submit form or submit form using anchor tag

HTML a href or Anchor tag can not submit form data [by using JS then can but that's so tricky, you have to get the input Feild data using JS and arrange that Data in Anchor tag's href attribute so PHP GET method can get the data from the URL that we genrated using JS].
But if you don't want to submit form Data and just want to redirect your Users using Anchor tags. Then use This method.

index.html

<a href="anotherPageLink.php">
  <button>Submit Button</button>
</a>

to submit HTML Form data to another Page we have HTML Form tag's Action Attribute.

index.html

<form action="anotherPageLink.php">
  <input type="text">
  <input type="submit">
</form>

Form action link to another page

To perform form action link to another page we have HTML Form and its Action Attribute.

index.html

<form action="anotherPageLink.php">
<input type="submit">
</form>

Add link to submit button html

To add link to submit button in HTML, we can use HTML Anchor Tags.
Whereby using anchor tag's href attribute we can assign a Path where we want to link our Submit button.

index.html

<a href="anotherPageLink.php">
  <button>Submit Button</button>
</a>

Submit button href

To use href attribute in HTML submit buttons, we can use HTML Anchor Tags.
Whereby using anchor tag's href attribute we can assign a Path where we want to link our Submit button.

index.html

<a href="anotherPageLink.php">
  <input type="submit"/>
</a>

How to link button to another page in html

To link button to another page in html, we have Anchor tags.

index.html

<a href="mypage.html">
  <button>Click me</button>
</a>

Where in href="" attribute we have to give a Path/File name where we want to Link our Button to.

Button link to another page html

index.html

<a href="mypage.html">
  <button>Click me</button>
</a>

Use this anchor tag to make a button link to another page in HTML.
Where you will need to enter your File name/path (where you want to link your HTML Button).
Use href="" attribute to assign a Path/File name inside Anchor tag.

How to link a button to another page in html

To link a button (HTML button) to another page in HTML we have 3 Diffrent Methods.
Using HTML Anchor tags
using HTML Forms
And using JavaScript window.location(); statement

But if you wan to do this in a very simpe way, Then i suggest you to use HTML Anchor tags to link your button in HTML.

index.html

<a href="mypage.html">
  <button>Click me</button>
</a>

Use this Anchor tag to make a button link to another page in HTML.
Where you will need to enter your File name/path (where you want to link your HTML Button).
Use href="" attribute to assign a Path/File name inside Anchor tag.

How to open another HTML page on button click

To open another HTML page on a button click, you will need to use Anchor tag or onClick() Event or HTML Forms
In this example I am going to use Anchor Tags to open another HTML page on a Button Click.

index.html

<a href="anotherpage.html">
  <button>Click Me</button>
</a>

How to make a button take you to another page html

To make a button that takes you to another page in HTML, you have options like Anchor tag or onClick() Event or HTML Forms.
In this example, I am going to use onClick() Event to make a button to take us to another page in HTML.

index.html

<button onClick="mytask()">
  Click
</button>
  
<script>
  function mytask(){ 
    window.location.href='anotherpage.html';
  }
</script>

Link button to another page html

Simply, to link a button to another page we can use HTML Anchor tags (you can also use onClick() Event or HTML Forms but anchor tags are very simple)
So by wrapping any Element inside Anchor tags, you can make that Element or Button Clickable Also by using Anchor tag's href attribute, you can link/redirect users to another page.

index.html

<a href="anotherpage.html">
  <button>Click Me</button>
</a>

Make button redirect to another page html

To make a button that can redirect to another page in HTML, you have 3 Easy Options [Anchor Tags, onclick() Events, and HTML Forms].
Let's use HTML forms to make a button that can redirect to another page.
Where you will need to provide your Another Page Path (file name with the File extension .html).

index.html

<form action="anotherpage.html">
  <input type="submit" value="Redirect Button"/>
</form>

How to link a button in html to another page

To link a button in HTML (with another page) you can use Anchor Tags.
In HTML Anchor tags you need to provide your Another page path (where you want your button to link) inside Anchor Tag's href attribute.

index.html

<a href="amothepage.html">
  <button>Click Me</button>
</a>

Add a submit url to a button element

To add a Another Page URL to a button Element, you can use Anchor Tags.
Where anchor tag can make HTML elements like Buttons clickable and also you can assign your Page URL to that Button Element by using the Anchor Tag's href attribute.

index.html

<a href="amothepage.html">
  <button>Click Me</button>
</a>

How to open another page on button click in HTML

To open another page on button click in HTML, you can use onClick events. Where you can specify a task inside onClick() Event (a task that you want to perform on click like redirect to another page).

index.html

<button onClick="mytask()">
  Click
</button>

<script>
  function mytask(){ 
    window.location.href='anotherpage.html';
  }
</script>

How to make a button that links to another page in html

To make a button that links to another page in HTML, you can use HTML Anchor tags. By using the Anchor tag's href attribute, you can specify where you want your button to link (line another page).

index.html

<a href="amothepage.html">
  <button>Click Me</button>
</a>

How to make a button lead to another page in HTML

To make a button that leads to another page in HTML, you can use HTML Anchor Tags. By using the Anchor tag's hrefattribute, you can specify where you want to lead/go when you click the button.

index.html

<a href="amothepage.html">
  <button>Click Me</button>
</a>

How to code a button to link to another page

To code a button to link to another page, you can simply code one HTML Button Element by using HTML button tags, and after that Wrap that button Element within HTML Anchor tags.
Anchor tags will make that button clickable and you can link that button to any page using the Anchor tag's href attribute.

index.html

<a href="amothepage.html">
  <button>Click Me</button>
</a>

Need Help?

If you are still facing issues regarding this totorial, then you can book a Free Google Meet Session and we will try to fix your issue over GoogleMeet.
Mail us at admin@programminghead.com and book a free Session Now.

Logo