How to go each section using html | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to go each section using html

After creating navigation bar . How to jump into each section on clicking on it . Suppose there is a Home page and have navigation bars Service , Blogs , contact. Then Click on any of them navigation bar redirect us to their sections in home page.

27th Oct 2021, 6:15 PM
Syed Md Aariz Alam
2 Answers
+ 1
To redirect to page, you need to set href inside a tag to link to that page. But for section you need to use id and set href to "#idOfSection" Example <a href="#contact">Contact</a> <section id="contact"></section> To go to top of the page you can just put "#" inside href
27th Oct 2021, 7:33 PM
PanicS
PanicS - avatar