+ 2
Hyperlink in html
So guys, can anyone explain me how I create an internal hyperlink in html? I didn't understand that in the html fundamentals course so I ask here. I want to create in the <nav> section of a site a link like Home or About us which leads to the <article> with the name Home or About us. Can anyone help me??
9 Answers
+ 5
You need to have an element with an ID. Then, <a href="#id">link</a>
That's it đ
+ 3
Oh man !!
<Div id="id">some text</div>
+ 3
Use #
+ 2
How do I create an ID?
+ 1
Use the anchor tag đ€
+ 1
Thx you guys!
0
You have to create an ID in the element you want to link. For example:
<article id=âburritoâ>content</article>
Your nav should look like this:
<nav>
<ul>
<li>
<a href=â#burritoâ>About burrito</a>
</li>
</ul>
</nav>