+ 3

Two URLs for href

How we can add a supporting URL to my HTML code? Using "comma" or some thing like this?

2nd Jul 2023, 6:00 PM
𝒦 ℛ
𝒦 ℛ - avatar
7 Respuestas
+ 9
There is no fallback option in HTML like that of the CSS font property. I recommend using two separate anchor tags: <a href="https://www.example1.com">Supporting URL 1</a>  <a href="https://www.example2.com">Supporting URL 2</a> This will display two links and if a link fails, you still have description of what the link is supposed to be about.
3rd Jul 2023, 4:14 AM
Chris Coder
Chris Coder - avatar
+ 5
What I understand is that u want to open for example two pages using one href isn't it? If is the case,you can use JavaScript like that: <a href="#" onclick="window.open('https://www.microsoft.com'); window.open('https://www.yahoo.com');" target="_blank" >Click Here</a>
2nd Jul 2023, 8:13 PM
🍉 𝓐𝓼𝓶𝓪𝓮 |ⴰⵙⵎⴰⴻ 🍉
🍉 𝓐𝓼𝓶𝓪𝓮 |ⴰⵙⵎⴰⴻ 🍉 - avatar
+ 2
K R What do you mean by supporting url what would be the purpose of this? Html doesnt seem to have supporting urls
2nd Jul 2023, 6:11 PM
Junior
Junior - avatar
+ 2
K R are you referring to audio or video urls not general hypertext url links to external content.
3rd Jul 2023, 4:07 AM
BroFar
BroFar - avatar
+ 1
No, I want two URLs because if one of them does work correctly , the other one would be shown. Like font family property in css that we can give multiple fonts so if the first one was unsupported, the second one would be shown.
3rd Jul 2023, 3:53 AM
𝒦 ℛ
𝒦 ℛ - avatar
+ 1
Thank you all 🙂
3rd Jul 2023, 1:09 PM
𝒦 ℛ
𝒦 ℛ - avatar
+ 1
K R As far as I know, I think, unlike CSS, there are likely no way to "seperate"multiple url by comma in HTML, you have to get each url, on a new line(?). You can use the "alt" attribute to describe the link when the link is not clickable or supported on your browser..
3rd Jul 2023, 4:46 PM
Dragon RB
Dragon RB - avatar