<p>This is a sentence that contains an <a href="#" class="external">external link<span> (opens in new window)</span></a> which you can see from this icon. Furthermore, there is a note for screen readers.</p>
CSS
.external::after {
content: "";
display: inline-block;
width: 0.75em;
height: 0.75em;
background-image: url("https://static.oswaldlabs.com/e80rj23-external.svg");
background-size: contain;
background-repeat: no-repeat;
vertical-align: middle;
margin-left: 0.25em;
margin-right: 0.1em;
}
.external span:last-child {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
/*
These are general styles, unrelated to this example
*/
body {
background: #fff;
color: #001b01;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
line-height: 1.6;
}
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.