+ 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??

13th Jul 2019, 9:38 AM
Banik
Banik - avatar
8 ответов
+ 5
You need to have an element with an ID. Then, <a href="#id">link</a> That's it 😊
13th Jul 2019, 10:16 AM
Ayan Fox
Ayan Fox - avatar
+ 3
Oh man !! <Div id="id">some text</div>
13th Jul 2019, 3:49 PM
Ayan Fox
Ayan Fox - avatar
+ 3
Use #
15th Jul 2019, 9:40 AM
Sonic
Sonic - avatar
+ 2
How do I create an ID?
13th Jul 2019, 3:19 PM
Banik
Banik - avatar
+ 1
Use the anchor tag 🤔
14th Jul 2019, 3:04 PM
Sanjay Kamath
Sanjay Kamath - avatar
+ 1
Thx you guys!
14th Jul 2019, 9:45 PM
Banik
Banik - avatar
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>
14th Jul 2019, 12:52 PM
Maria
Maria - avatar