Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialSebastian Eguez
8,248 PointsOpening a link on a new tab
I tried using this: target="_blank"
<footer>
<a target="_blank" href="http://twitter.com/shots_insight"><img src="img/twitter-wrap.png" alt "Twitter Logo" class="social-icon">
</a>
<a target="_blank" href="http://facebook.com/animalpy91"><img src="img/facebook-wrap.png" alt "Facebook Logo" class="social-icon">
</a>
<p>© 2016 Sebastian Eguez</p>
</footer>
I want my social links to open on a new tab. How can I do this? : )
2 Answers
Muhamed Asil
7,453 Pointsyou should add equal sign after alt.
<footer>
<a target="_blank" href="http://twitter.com/shots_insight"><img src="img/twitter-wrap.png" alt="Twitter Logo" class="social-icon">
</a>
<a target="_blank" href="http://facebook.com/animalpy91"><img src="img/facebook-wrap.png" alt="Facebook Logo" class="social-icon">
</a>
<p>© 2016 Sebastian Eguez</p>
</footer>
Steven Parker
231,198 PointsOne part of opening a window on a new tab is to have your link include the target attribute, set to "_blank". It looks like you already have that part.
The other part is a browser setting. The user chooses if they want the default operation to be a tab or a window. You can't control that part.
And while it's not related to your question, Muhamed has a good point: your images are missing the equal sign after the alt property.
Sebastian Eguez
8,248 PointsSebastian Eguez
8,248 PointsSOLVED.
: )