Reputation: 1
I have the following code in my html. When I click on the icon I want to be taken to my websites facebook account.
<li><a href="www.facebook.com/mywebsitename"><i class="fa fa-facebook" aria-
hidden="true"></i></a></li>
However instead I get my webpage without any css and the url changes to the following url. Why is this?
https://mywebiste.com/www.facebook.com/mywebsite
Upvotes: 0
Views: 324
Reputation: 11
This happens because you didn't write the beginning of the line address. He directs you to your own page in this project because he doesn't know where to go. Use https://
.
<a href="https://www.facebook.com/mywebsitename">
Upvotes: 1
Reputation: 18413
Your URL should be starting with a scheme:
<a href="https://www.facebook.com/mywebsitename">
See more here: What_is_a_URL
Upvotes: 1
Reputation: 320
The URL is considered as a directory Path. try to replace
href="www.facebook.com/mywebsitename"
to
href="https://www.facebook.com/mywebsitename"
Upvotes: 3