I have a paragraph object such as the following:
<p>This is an example of a <span class="paragraph-link-example"> paragraph </span> </p>
(Stackoverflow isn’t showing the HTML tags, so here is an image)
https://i.stack.imgur.com/dLxD2.png
How do I make the .paragraph-link-example
class open a new link (preset by me) when clicked?
2
Answers
I think you just need to replace the
<span>
by a<a href="{your link}"> Your text</a>
.You can either replace
<span>
with<a href="https://google.com">GOOGLE</a>
tag and style that.OR place
<a href="https://google.com">
tag within the<span>
like<span> <a href="https://google.com"> </span>
OR add script in js like this: