So I am currently trying to create my first website and after I was done adding the nav links, I then checked live server to see if my links were there and they are not there rather they are invisible I think(check 1st image with flags top right), the code I used in in the 2nd and 3rd image.
You put text in the href attributes but not in the body of the anchor (a
) elements.
If you want to be able to see the links you need content between the opening <a href="...">
and the closing </a>
.
What should I type in?
So rather than:
<a href="HOME"></a>
You need something more like:
<a href="#">HOME</a>
The href
attribute is what the anchor points to. If you want the text “HOME” to appear, you need to put it in the body of the <a>
tag.
@Yothestudent the answer that jmrunkle gave is correct so I will just give you some more details about why jmrunkle did that:
The href attribute is the attribute where you add an absolute or a relative url for where you want the url to redirect you and in between the <a>"text"</a>
goes the text, so if you want it to be invisible just add no text.