When a user come to my site and on main page when user clicks on any post on post title that post should open in new tab. Its Google Blogger related.
Asked
Active
Viewed 62 times
1
-
Welcome to Stack Overflow! Please visit the [help], take the [tour] to see what and [ask]. Do some research, search for related topics on SO; if you get stuck, post a [mcve] of your attempt, noting input and expected output. – mplungjan Dec 11 '18 at 12:29
-
1To open a link in a new tab/window (the browser controls which, you don't) you would add a `target` to the link. For example: `link` – David Dec 11 '18 at 12:30
-
Possible duplicate of [Open a URL in a new tab (and not a new window) using JavaScript](https://stackoverflow.com/questions/4907843/open-a-url-in-a-new-tab-and-not-a-new-window-using-javascript) – deedub Dec 11 '18 at 12:32
2 Answers
1
your anchor tag or link should be looks like below with target="_blank"
:
<a href="Post.html" target="_blank">link</a>

Yogesh Patel
- 818
- 2
- 12
- 26
0
Your post title will be in an anchor tag, only you must include target
attribute and assign _blank
as the value for that as shown below so that after clicking that it will automatically opens in a new tab.
<a href="http://something.com" target="_blank">Post Title</a>

Ayman Safadi
- 11,502
- 1
- 27
- 41

T Chakradhar
- 9
- 2