140k views
5 votes
This code creates a link to another page. Which of the following will cause the page to open in a new browser window?

Codecademy
A) Add target="_blank" to the tag: Codecademy
B) Change the link to Codecademy
C) Apply a special CSS class to make it open in a new window
D) There is no way to make it open in a new window using HTML alone.

1 Answer

4 votes

Final answer:

To open a page in a new browser window, the target attribute can be used with the value "_blank".

Step-by-step explanation:

The correct option to cause the page to open in a new browser window is to add target="_blank" to the <a> tag. This attribute specifies that the link should open in a new tab or window. Here's an example:

<a href="Codecademy" target="_blank">Codecademy</a>

By adding target="_blank", clicking on the link will open the destination page in a new browser window.

User Ryan Walker
by
8.4k points