From the course: CSS Shorts

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Indicating off-site links

Indicating off-site links - CSS Tutorial

From the course: CSS Shorts

Indicating off-site links

- [Chris] Hi, this is Chris Converse and in this episode we'll use CSS to indicate to our users links that open in new browser windows or tabs. So, if you'd like to follow along, download the exercise files and we'll begin by opening the HTML file in a text editor. And once you have the HTML file open up in the head area you'll see we have a link to our style sheet called style.css and we'll be opening this in a moment, and if I scroll down the page you'll see an unordered list with a series of list items. Inside of each list item is an anchor tag with a link to a particular episode of CSS Shorts. So, what we're going to do here is target a new window for some of these links. So, I'll come down here to the second item and before the href I'll add target equals, two quotes and then inside of the quotes we'll put _blank. So, this will tell the browser that we want this link to open in a new window. So, now I'll come in here, select and copy this, I'll paste it on the third item and then…

Contents