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 trialHenry Spock
20,615 PointsIn the anchor-tags section of Learn HTML, at the end, target="_blank" syntax doesn't work in Chrome or Firefox.
I've checked this several times in Chrome and Firefox and can't get the Twitter icon to open the Twitter page in a new tab.
Vin Amorando
1,717 PointsI'm having the same issue using Firefox. The link to Twitter works fine but not in a new browser. The '#top" link doesn't work. My code:
<p><a href"#top"><img src="http://placeimg.com/400/400/people" alt="Drawing of Jane Smith" class="profile-image">This is a third paragraph.</a></p>
<a href="http://twitter.com" target="_blank" class="social twitter">Twitter</a>
5 Answers
Henry Spock
20,615 PointsThanks for replying Rhydian. Here is my code line - when I click on the Twitter icon on the page, it clicks through, rather than opening a new tab:
<li><a href="http://twitter.com/afatherwhoreads" target="_blank" class="social twitter">Twitter</a></li>
Rhydian Davies
4,744 PointsWorks for me, have you got a popup blocker or browser extentions that might modify the way it handles links installed at all?
Henry Spock
20,615 PointsI turned off all of my extensions and restarted the browser, I still get the same behavior (in Chrome.)
Rhydian Davies
4,744 PointsI'm out of ideas, hopefully, someone who's had the same issue will popup. I would remove the _blank and let the visitors browser decide how to open links but for the sake of the course I understand it's a useful tool.
Henry Spock
20,615 PointsJust checked "popups and redirects" under settings, it's not on and no sites are added.
Henry Spock
20,615 PointsYeah, I understand that browsers read things differently, but it would be nice to get the expected behavior. At least you mention the code is ok. I appreciate your time. :)
Henry Spock
20,615 PointsRhydian - I'm getting the proper behavior now in a later section where I use target="_blank" in an href that points to a text link. I think it's something about the image link (the Twitter bird.)
Rhydian Davies
4,744 PointsGlad you got it working!
Rhydian Davies
4,744 PointsRhydian Davies
4,744 PointsI haven't checked this particular part of the course out. But I have tested target blank on both chrome and firefox successfully. <a href="#" target="_blank">Test link</a>
I would check for any errors missing " etc.