Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

HTML Introduction to HTML and CSS HTML: The Structural Foundation of Web Pages and Applications Anchor Tags

In 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.

I 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.

I'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

Thanks 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>

Works for me, have you got a popup blocker or browser extentions that might modify the way it handles links installed at all?

I turned off all of my extensions and restarted the browser, I still get the same behavior (in Chrome.)

I'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.

Just checked "popups and redirects" under settings, it's not on and no sites are added.

Yeah, 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. :)

Rhydian - 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.)

Glad you got it working!