0
How to add button on html?
html nav button hello I have a question abou html. how to create a button from nav that when you click it bring you to a section of the same page ?
3 odpowiedzi
+ 9
There comes id attribute and href attribute to play.
You can have multiple section in one page, and at the top you have multiple link.
<a href="#sec1">section 1</a>
<a href="#sec2">section 2</a>
<a href="#sec3">section 3</a>
Now you have different sections
Make sure you use same id as you used up there.
<div id="sec1"></div>
<div id="sec2"></div>
<div id="sec3"></div>
That's it, when someone clicks on that links it will bring them to respective section
0
<button>