How to Embed a Target in a URL

Save

Creating an HTML URL link allows you to embed a target. The target tells the link how it should open. The most common examples involve a link opening in either a new browsing tab or window or opening in the same window. The basic HTML target tag lets you control the behavior of the link. Without using the target tag, the link automatically opens in the same browsing tab or window.

  • Type the opening HTML link tag: <a href="http://yoursitehere.com"

  • Replace "yoursitehere" with the URL of the website you are linking to.

  • Add the following tag after the opening link tag: target="_blank"

  • Replace "_blank" with "_top" if you would prefer the link to open in the same window. The "_blank" tag makes the link open in a new tab or window, depending on the user's browser settings.

  • Close the HTML link tag by adding the following: />

    The final product should look like this, with your own custom values inserted:

    <a href="http://www.yoursitehere.com" target="_blank" />

Tips & Warnings

  • You can also use the target tags "_self" or "_parent." If the link is within a separate frame, these tags will cause the link to open in the frame. If there is no separate frame, these tags simply cause the link to open in the same window.

References

Promoted By Zergnet

Comments

You May Also Like

Related Searches

M
Is DIY in your DNA? Become part of our maker community.
Submit Your Work!