Code in HTML – hyperlinks that open in a new tab

Hi guys. Wanna know how to open Hyperlinks in a new tab. Well, this is the guide for you!

Epic Chas Gamer

Use the following code: <a href=”siteorblogname.com” target=”_blank”>Here!</a>

Replace siteorblogname.com with the site you want to link to. Then, change here to whatever you want the hyperlink to be displayed as. Then, hey presto. When you click on the hyperlink it will open in a new tab!

Enjoy!

Epic Chas Gamer 😀

6 thoughts on “Code in HTML – hyperlinks that open in a new tab

  1. this is a good one to know. i learned it when i learned frames (i know, ugh– frames!) but i really hate it when people do this. if i (as the person browing) want to open in a new tab, i will use ctrl, or right-click and open in a new tab.

    the browser should have a right-click option “open in the same tab anyway,” but it doesnt. (also– wordpress thwarts ctrl-click with javascript and i find that loathesome. its not nearly as bad as medium.com and stuff they pull, though.)

    Liked by 1 person

  2. A subject I have not covered Epic Chas Gamer, nice one.

    codeinfig is right in a way, use target=”_blank” with caution as it may not be to everyone’s tastes. Some don’t mind links opening in new windows / tabs, while others find it really irritating.

    Alas I’m guilty of using target=”_blank”, but I’m strongly considering reviewing my posts to remove that and let the user decide through Ctrl+click / right-click Open in new window or tab.

    Liked by 1 person

    1. Well, newsordice. I don’t use open in new tab very often because I am developing a web browser in Python and it currently doesn’t have multiple tab support. I only use it when I need to. Cheers! Epic Chas Gamer 😎

      Like

Go on, you know you want to! Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s