What is the best practice for showing an Icon next to text [closed]

I am coming late to this party, but look what I have found at CodePen ! a[target=”_blank”]::after { content: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAQElEQVR42qXKwQkAIAxDUUdxtO6/RBQkQZvSi8I/pL4BoGw/XPkh4XigPmsUgh0626AjRsgxHTkUThsG2T/sIlzdTsp52kSS1wAAAABJRU5ErkJggg==); margin: 0 3px 0 5px; } <a class=”external” href=”https://example.org” target=”_blank”>external link</a>

Setting xsl:value-of into an href attribute and the text field of a link in an XSLT

<xsl:text> defines a text section in an XSL document. Only real, plain text can go here, and not XML nodes. You only need <xsl:value-of select=”actionUrl”/>, which will print text anyways. <xsl:element name=”a”> <xsl:attribute name=”href”> <xsl:value-of select=”actionUrl”/> </xsl:attribute> <xsl:value-of select=”actionUrl”/> </xsl:element>

CSS: Style external links

2021 Solution a[href]:not(:where( /* exclude hash only links */ [href^=”#”], /* exclude relative but not double slash only links */ [href^=”https://stackoverflow.com/”]:not([href^=”//”]), /* domains to exclude */ [href*=”//stackoverflow.com”], /* subdomains to exclude */ [href*=”//meta.stackoverflow.com”], )):after { content: ‘↗️’; } <strong>Internal sites:</strong> <br>Lorem <a href=”http://stackoverflow.com”>http://stackoverflow.com</a> ipsum <br>Lorem <a href=”https://stackoverflow.com/a/5379820″>/a/5379820</a> ipsum <br>Lorem <a href=”https://stackoverflow.com/a/5379820″>//stackoverflow.com/a/5379820</a> ipsum <br>Lorem <a href=”http://stackoverflow.com/a/5379820″>http://stackoverflow.com/a/5379820</a> …

Read more

Html- how to disable ? [duplicate]

You can use CSS to accomplish this: .disabled { pointer-events: none; cursor: default; } <a href=”https://stackoverflow.com/questions/28318057/somelink.html” class=”disabled”>Some link</a> Or you can use JavaScript to prevent the default action like this: $(‘.disabled’).click(function(e){ e.preventDefault(); })

Href without http(s) prefix

It’s possible, and indeed you’re doing it right now. It just doesn’t do what you think it does. Consider what the browser does when you link to this: href=”https://stackoverflow.com/questions/43803778/index.html” What then would it do when you link to this?: href=”https://stackoverflow.com/questions/43803778/index.com” Or this?: href=”www.html” Or?: href=”www.index.com.html” The browser doesn’t know what you meant, it only knows …

Read more