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 trial

HTML

target="_blank"

The 'https://teamtreehouse.com/library/creating-links' video at +4:30 explains that I need to set the target attribute value to _blank (target="_blank") in order to open the link in a new browser tab. No Problem.

For fun I looked at the teacher's notes links in the html source code for in this lesson's webpage and I noticed that the there is no target attribute in the html, yet the teacher's notes links do in fact open the link in a new browser tab. WHY?

See Line 301 in the 'view-source:https://teamtreehouse.com/library/creating-links' html page.

2 Answers

it's not necessary to appear in view source section knowing that websites code are not that simple, for example some websites prohibit opening link in new tabe option, if you use view source option to show the url to open it , you won't find it in the code source, for example, any instructor profile on udemy.com, you will find the instructor courses right there but you have to press one after another through the same browser tab to go to the course, while you can't open them in new tab.

I think that some of the attributes are added in other file formats, like in a JS file, or another language to html elements. So they wouldn't necessarily show in the html source until an event has occurred, like in JS(DOM operative).