HTML and CSS Reference
In-Depth Information
commonly used this way when linking to an external site, so the user still has the option of staying
on the current site:
<a href=”” t arget=”_blank”>Wikipedia</a>
The target attribute has four accepted values, although only two are useful in HTML5:
Opens the linked content in a new window or tab, as determined by the browser
Opens the linked content in the same window/tab as the current document.
Opens the linked content in the surrounding frameset, if present. Frames are obso-
lete in HTML5.
Opens the linked content in the topmost frame, if present. Again, frames are obsolete in
Try iT
In this Try It you learn how to link to a page from another page.
Lesson requirements
You will need a text editor, a web browser and Thoreau.html.
You can download the code and resources for this exercise from the topic's web
page at .
Open your text editor.
From the Lesson_08 folder, open thoreau.html .
Place your cursor between the <p> tag and the text Henry David Thoreau .
Enter the following code:
<a href=””target=”_blank”>
Place your cursor after the text Henry David Thoreau .
Enter the following code:
77 7
Save your text document.
In your browser, open thoreau.html to view the link, as shown in Figure 8-2.
Search WWH ::

Custom Search