Can a single text link point to two different web pages?


#1

Can a single text link point to two different web pages?


#2

Hi vidhyaa.
Technically it is possible with javascript onclick() event. But most modern browsers detect and block such tries.


#3

i just want to know the possibility with html


#4

This looks technical unethical. I would not recommend such practice.


#6

It is not possible with pure HTML. You should write javascript function for that.
For example
function doubleopener(){window.open("smth"); document.location="smth";}
then to put it to a link
<a href="javascript://" onclick="doubleopener()">link</a>
That’s all. But as Bryan wrote above, it is not ethical and disrespect to your visitors.


#7

this is not possible with html only.


#8

No, I think you can’t link one text to two or more hyperlink in HTML . When you add to different other links to text ,So it opens only last link who you updated.


#9

Hello Vidhyaa,

If you want to check whether tag is possible or not, you can check the tag in HTML validator tool.