Interview Questions

How do I create a link that opens a new window?

HTML Interview Questions and Answers


(Continued from previous question...)

47. How do I create a link that opens a new window?

<a target="_blank" href=...> opens a new, unnamed window.
<a target="example" href=...> opens a new window named "example", provided that a window or frame by that name does not already exist.
Note that the TARGET attribute is not part of HTML 4 Strict. In HTML 4 Strict, new windows can be created only with JavaScript. links that open new windows can be annoying to your readers if there is not a good reason for them.

(Continued on next question...)

Other Interview Questions