Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <h1>Simulating screen reader text experiences</h1>
    <a href="#">Link with hidden text<span class="sr-only">for screen readers</span></a>
    <a href="#">Link with no hidden text</a>
    <a href="#">Another link with hidden text<span class="sr-only">for screen readers only</span></a>
    <a href="/">Learn more<span class="sr-only">about product one</span></a>
    <a href="#">Learn more<span class="sr-only">about product two</span></a>

This is some marketing text that explains how a product works. Sometimes <a href="#">links<span class="sr-only">with no context for screen readers</span></a> are included. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco.

<h2>Add Bookmarklet</h2>
    <button class="js-copy-button">Copy code</button>
    Add bookmarklet code in the URL field for a bookmarket
    Navigate to a page and click the bookmarklet to add the "listen" buttons
    Or just try running the code on any page by running it in your console!
  <code class="language-javascript">javascript:(function(){const addSrOnlyButtons=()=>{const createListenButton=button=>{const buttonItem=document.createElement("button"),buttonText=button.innerText.replace(/\n/g," ");buttonItem.setAttribute("onclick",`readSrOnlyText('${buttonText}')`),buttonItem.innerText="Listen","yellow","black","1px gray solid","5px","5px","14px","5px",button.after(buttonItem)},buttons=document.querySelectorAll("a");buttons.forEach(button=>createListenButton(button))},readSrTextFunction=document.createElement("script");readSrTextFunction.innerHTML="const readSrOnlyText = (buttonText) => {const speech = new SpeechSynthesisUtterance(); speech.text = buttonText; speech.volume = 1; speech.rate = 1; speech.pitch = 1; window.speechSynthesis.speak(speech);};",document.querySelector("body").appendChild(readSrTextFunction),addSrOnlyButtons();})();</code>


  font-family: sans-serif;
  max-width: 800px;
  margin: auto;
  padding-left: 1em;
  padding-right: 1em;

/* From Bootstrap */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    -webkit-clip-path: inset(50%);
    clip-path: inset(50%);
    border: 0;

/* Prism */
pre[class*="language-"] {
	color: #c5c8c6;
	text-shadow: 0 1px rgba(0, 0, 0, 0.3);
    font-family: Inconsolata, Monaco, Consolas, 'Courier New', Courier, monospace;
	direction: ltr;
	text-align: left;
	white-space: pre;
	word-spacing: normal;
	word-break: normal;
	line-height: 1.5;
	-moz-tab-size: 4;
	-o-tab-size: 4;
	tab-size: 4;
	-webkit-hyphens: none;
	-moz-hyphens: none;
	-ms-hyphens: none;
	hyphens: none;

/* Code blocks */
pre[class*="language-"] {
	padding: 1em;
	margin: .5em 0;
	overflow: auto;
	border-radius: 0.3em;

:not(pre) > code[class*="language-"],
pre[class*="language-"] {
	background: #1d1f21;

/* Inline code */
:not(pre) > code[class*="language-"] {
	padding: .1em;
	border-radius: .3em;

.token.cdata {
	color: #7C7C7C;

.token.punctuation {
	color: #c5c8c6;

.namespace {
	opacity: .7;
.token.tag {
    color: #96CBFE;

.token.class-name {
	color: #FFFFB6;
	text-decoration: underline;

.token.constant {
    color: #99CC99;

.token.deleted {
	color: #f92672;

.token.number {
	color: #FF73FD;

.token.inserted {
	color: #A8FF60;

.token.variable {
	color: #C6C5FE;

.token.operator {
    color: #EDEDED;

.token.entity {
    color: #FFFFB6;
    /* text-decoration: underline; */

.token.url {
    color: #96CBFE;

.language-css .token.string,
.style .token.string {
	color: #87C38A;

.token.attr-value {
    color: #F9EE98;

.token.function {
	color: #DAD085;

.token.regex {
    color: #E9C062;

.token.important {
	color: #fd971f;

.token.bold {
	font-weight: bold;
.token.italic {
	font-style: italic;

.token.entity {
	cursor: help;



                const addSrOnlyButtons = () => {
  const createListenButton = (button) => {
    const buttonItem = document.createElement("button");

    // trim buttons text to a single line
    const buttonText = button.innerText.replace(/\n/g, " ");
    buttonItem.setAttribute("onclick", `readSrOnlyText('${buttonText}')`);
    //adding some inline styles to make it easier to see the button
    buttonItem.innerText = "Listen"; = "yellow"; = "black"; = "1px gray solid"; = "5px"; = "5px"; = "14px"; = "5px";
    //appending the button

  const buttons = document.querySelectorAll("a");
  buttons.forEach((button) => createListenButton(button));

const readSrOnlyText = (buttonText) => {
  const speech = new SpeechSynthesisUtterance();
  speech.text = buttonText;
  speech.volume = 1;
  speech.rate = 1;
  speech.pitch = 1;


const copyButton = document.querySelector(".js-copy-button")

copyButton.onclick = function() {
  const code = document.querySelector(".language-javascript").innerText;
  copyButton.innerText = "Copied code!"
    copyButton.innerText = "Copy code" 
  }, 3000);