Question:

How to get links to open in a new window?

by  |  earlier

0 LIKES UnLike

I am making a website using weebly.com and have created some external links. There is no option (that I see) to have these open in a new window and I'm wondering is their a code I can add to the link url which *will* make the link open in a new window? Please help.

 Tags:

   Report

2 ANSWERS


  1. <a href =" whateverlink.com" target="_blank" > click here </a>

    target="_blank" is what makes it open in a new window


  2. HTML code:

    <a href="url" target="_blank">text</a>

    JavaScript code:

    <script language="javascript">

    document.write

    ("<a href='url' target='_blank'>text</a>")

    </script>

Question Stats

Latest activity: earlier.
This question has 2 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.