Reece
Reece

Reputation: 2711

Font Awesome icons not working as links

My font awesome icons aren't linking to where I set the href on the a tag. In fact when I inspect them there is no href on the a tag. I have some demo code for you to look at, but on the demo code it does show the href when inspecting it just doesn't link to the page. Maybe if this code is fixed it will fix my issue. Thanks

<a href="https://www.google.co.uk/">
  <i class="fa fa-facebook-official fa-3x" aria-hidden="true"></i>
</a>

<script src="https://use.fontawesome.com/7c396dc5cb.js"></script>

https://jsfiddle.net/znvfbu9g/

Upvotes: 1

Views: 6351

Answers (2)

Grant Coombs
Grant Coombs

Reputation: 47

Do you have the latest CDN attached to you page to display the icons?

http://fontawesome.io/get-started/

Upvotes: 0

nashcheez
nashcheez

Reputation: 5183

Provide a target attribute to your a tag.

Something on the lines of:

<a target="_blank" href="https://www.google.co.uk/">
  <i class="fa fa-facebook-official fa-3x" aria-hidden="true"></i>
</a>

Check updated fiddle.

Upvotes: 5

Related Questions