Multiple links that link to the same page

402 Views Asked by At

I'm creating a website for a uni project. We're using javalin, html and css ONLY. What I'm trying to do is to display a webpage which has content that changes based on what link the user pressed. For example, if a user presses on the 'US' link, a webpage with the title US and the related data pops up. While if he chooses 'MEXICO', a webpage with the title MEXICO and the related data pops up. If you are not able to provide the code, please inform me about the implementation method.

1

There are 1 best solutions below

5
Ibrahim Rehman On

You can create multiple HTML pages for that, like one for the US and one for Mexico. Then, link those pages with the main page using anchor tags. e.g:

In index.html:

<a href="./mexico.html">Mexico</a>