I am beginner at code. I am trying to get my navbar to go to the correct sections of my HTML page. For instance, I want my skills href to go to the skills section of the html. I know I am missing something, but I do not know what it is.I greatly appreciate your help!
Here is my code for my navbar
<div class="Navbar" style="position: inherit;">
<a class="active" href="#aboutme">About Me</a>
<a class="active" href="#skills">Skills</a>
<a class="active" href="#contactme">Contact Me</a>
</div>
here is my code for the #skills section. All of the sections have the same coding.
<div class="skills">
<h2 class="header">Skills</h2>
<div class="skills-img">
<img src="HTML.png" alt="html" width="100px">
<img src="Css.png" alt="css" width="75px">
<img src="JavaScript-Logo.png" alt="Javascrip" width="180px">
</div>
3
Answers
You have to use the id Attribute.
Example:
I think this will help you: https://www.w3docs.com/snippets/html/how-to-create-an-anchor-link-to-jump-to-a-specific-part-of-a-page.html
another option is to add an
a
tag with name attribute set it to a unique name in the webpage that you want the link to jump too, this is called fragment identifier (see Chapter 7 from: https://tools.ietf.org/html/rfc1866), as a beginner, I advice to start studying the standards, not only online tutorials…