HTML href to Youtube and Twitter "refuse to connect"

Viewed 2879

I'm trying to do a simple href to my Twitter and Youtube channel but both come up with "twitter.com refused to connect" or "youtube.com refused to connect." I'm not sure what the issue is and I've tried with other sites but keep getting "{site} refused to connect." I've also tried with a simple href with no classes and the same results. Here is the code.

<ul class="social-buttons">
                    <li>
                        <a href="http://twitter.com/TylerFlar" class="btn btn-just-icon btn-simple btn-twitter">
                            <i class="fa fa-twitter"></i>
                        </a>
                    </li>
                    <li>
                        <a href="https://www.youtube.com/channel/UCcvcqbRiPopzRCTSmm_Oi4g" class="btn btn-just-icon btn-simple btn-youtube">
                            <i class="fa fa-youtube-play"></i>
                        </a>
                    </li>
                </ul>

I'm using Xammp Apache to run my site, maybe that has a problem with hrefs?

1 Answers

Add a target="_[whatever]" attribute to the anchor elements:

<ul class="social-buttons">
  <li>
    <a href="http://twitter.com/TylerFlar" class="btn btn-just-icon btn-simple btn-twitter" target="_blank">
      Twitter
    </a>
  </li>
  <li>
    <a href="https://www.youtube.com/channel/UCcvcqbRiPopzRCTSmm_Oi4g" class="btn btn-just-icon btn-simple btn-youtube" target="_blank">
      Youtube
    </a>
  </li>
</ul>

Working CodePen

Related