I'm creating a website using HTML but I'm not sure how to create navigation buttons to switch to another page in the website. All I know how to do is make buttons that navigate already published links such as YouTube for example. My website is not published and I'm just using VSCode and Google as my live server host while I work.
I tried using the "src" attribute to open another document but that didn't work, nothing came from it and I'm still stuck.
CodePudding user response:
Maybe use "/pagehere" for a different directory or "pagehere" for the same directory.
Also, "src" should be replaced with "href".
CodePudding user response:
You can use an link tag or a form tag with input tag inside.
<a href="otherpage.html">Button</a>
or
<form action="otherpage.html" method="get">
<input type="submit" value="Button"/>
</form>