All TalkersCode Topics

Follow TalkersCode On Social Media - A Social Media Network for developers Join Now ➔

How To Navigate To Another Page In HTML

Last Updated : Mar 11, 2024

How To Navigate To Another Page In HTML

In this tutorial we will show you the solution of how to navigate to another page in HTML and how you are able to navigate from one page to another page in HTML.

From this question, we can arise another question that is how to link webpages to each other because when you have to navigate from one page to another, the pages must be linked with each other. Now, let us understand how we can do this.

Step By Step Guide On How To Navigate To Another Page In HTML :-

The tag which is used here is named as anchor tag. Anchor tag is used for the purpose to navigate between webpages in HTML.

You can use any one like text, button, image and what you want to navigate.

Here below we are going to show you codes in html which explain you how to use anchor tag for navigation.

<!DOCTYPE html>
          <title> Title of the document<title>
   <a href="">
        click here to open google
    <a href="project/one.html">
        <img src=”this.jpeg”>
    <a href=" ">
  Button, click me
  1. First, we write <! DOCTYPE html> which we used as an instruction to the web browser about what version of HTML file is written in.
  2. Secondly, the <html> tag is used to indicate the beginning of an HTML document.
  3. As above now <head> tag is used to contain information about web page. In this tag a <title> tag is used which helps us to specify a webpage title.
  4. Both <head> and <title> tags are Paired tags. So, both have </head> and </title> ending tags respectively.
  5. Thirdly, <body> tag is used to define the webpage body. All the contents to show on website are written here.
  6. Here, in body we show you how to use anchor tag to navigate to another page. Here, in this article we create three anchor tags and they all are different.
  7. In first anchor tag, user is navigated to google home page when he/she clicks on the text.
  8. In next case you will see an image there and where you clicks on this image you are redirected to html file under project folder with name this.
  9. And at last you will see a button on webpage with text button, click me. and when user clicker on the button. He/she will be redirected to index page of
  10. We hope that you understand how we will use anchor tag to navigate.
  11. For navigation you just have to write the link of file in href attribute of anchor tag and all gets done. There are many attributes of anchor page for them you must have to visit our webpage with topic attribute of anchor tag.
  12. At last, the <body> and <html> tags are closed with </body> and </html> respectively.

Conclusion :-

At last in conclusion, here we can say that with the help of this article we are able to navigate to another page in html. I hope this tutorial on how to navigate to another page in HTML helps you.

Author Image About Anjali

Experienced Computer Programmer with a broad range of experience in technology. Strengths in application development and Object Oriented architecture design, front end programming, usability and multimedia technology. Expert in coding languages such as C, C++ Java, JavaScript, PHP and more.

Follow Anjali On Linkedin 🡪