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 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
CodePudding user response:
The URL is considered as a directory Path. try to replace
href="www.facebook.com/mywebsitename"
to
href="https://www.facebook.com/mywebsitename"
CodePudding user response:
Your URL should be starting with a scheme:
<a href="https://www.facebook.com/mywebsitename">
See more here: What_is_a_URL
CodePudding user response:
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">
