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 trialMickey Alli
216 PointsWhat is the purpose of underscore in the target attribute before the blank?
In the final parts of a video where we try to create a link that opens a new tab, within the anchor tags after the href, what is the purpose of the underscore after the target attribute. I tried it without the underscore and it works as well.
1 Answer
Steven Parker
231,236 PointsThe keyword "_blank" (with the underscore) always creates a new target window or tab. Anything else (including the word "blank" with no underscore) creates a named target, and unless you already had a target with that name, it would appear to do the same thing. But if you reference it again, it would change the location of the previous window or tab instead of creating another new one.