Any way to add a HTML <a>
rel Attribute to an image? Or any other link.
Hi @andrewtyler,
Thanks for reaching out.
May I know which links you’re referring? Or are you saying that you wish to add rel to an image element too? Please provide further information
But if you’re referring to image link’s rel="no-follow"
, you can simply turn on that option when you inspect your image with link.
Thanks!
Adding a rel to an image, or button, anywhere there is a link really. So not just the no-follow, but any rel. It’s used a lot in js scripts and there’s a bunch more: https://www.w3schools.com/tags/att_a_rel.asp
Hi There,
In this case, you can try with this HTML codes:
<a href="#" rel="nofollow"><img src="http://localhost/x/wp-content/uploads/2018/07/fitness-man.png" /></a>
<a href="#" rel="noreferrer"><img src="http://localhost/x/wp-content/uploads/2018/07/fitness-man.png" /></a>
<a href="#" rel="noopener"><img src="http://localhost/x/wp-content/uploads/2018/07/fitness-man.png" /></a>
Hope it helps
Yeah it’s easy to do in straight html. It would be nice to have this functionality available to use with the v2 elements. Especially because the code is already in there to add the rel=nofollow.
Thank you for your feedback
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.