Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation


Save Automatically?

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

  <h1>HTML Buddies: <code>&lt;del&gt;</code> & <code>&lt;ins&gt;</code></h1>

    These styles may not be beautiful (they aren’t), but they work for screen reader users who cannot see them (including multilingual support), they work in Windows High Contrast Mode (WHCM), and they work when printed. That means you can steal the CSS and fold it into your own eye-catching styles to make them accessible. Also, the contrast in these examples is sufficient, but be sure your own styles have good contrast too.

  <h2>Deleted Text</h2>

    Using the <code>&lt;del&gt;</code> element on <del>text that we are indicating is deleted</del>. It should be obvious which text we just cut.

  <h2>Inserted Text</h2>

    Opposite of the last one, this is <ins>text that we are indicating has been added</ins>. We do this with the <code>&lt;ins&gt;</code> element.


      Read more in my blog post <a href="http://adrianroselli.com/2017/12/tweaking-text-level-styles.html"><cite>Tweaking Text Level Styles</cite></a>, where I also discuss <code>&lt;mark&gt;</code> and <code>&lt;s&gt;</code>. I have screen shots of print styles and WHCM, and videos of screen readers.

      This pen is for the May 2018 week 1 CodePen challenge, <a href="https://codepen.io/challenges/2018/may/">HTML Buddies</a>.
      You can see a <a href="https://blog.codepen.io/2018/05/14/html-buddies-may-codepen-challenges/">wrap-up of week 1 on the CodePen blog</a>.
      See <a href="http://adrianroselli.com/2018/06/codepen-html-buddies-challenge.html" target="_top">all four of my pens for this challenge</a> at my site with additional context.

              @import url('https://fonts.googleapis.com/css?family=Lato:400,700|VT323');

body {
  background-color: #a08caf;
  color: #333;
  font-family: Lato, Arial, sans-serif;
  padding: 0;
  margin: 0;
  line-height: 1.5;

li:not(:first-of-type) {
  margin-top: 1em;

code {
  font-family: 'VT323', 'Courier New', Courier, monospace;
  font-size: 110%;
  font-weight: normal;
  font-variant-ligatures: none;
  padding: 0.05em 0.25em;
  background-color: rgba(255, 255, 255, 0.75);
  border-radius: 0.5em;
  box-decoration-break: slice;

main {
  display: block;
  box-sizing: border-box;
  width: 90%;
  margin: 1em auto;
  padding: 1em 2em;
  color: #000;
  background-color: rgba(255, 255, 255, 0.8);
  border: 0.07em solid rgba(0, 0, 0, 0.5);
  border-radius: 0.5em;

/* Base styles */
del {
  text-decoration: line-through;

ins {
  text-decoration: none;
  border-bottom: 0.2em double #080;

/* Screen-reader styles */
ins::after {
  /* Common style for visually-hiding content */
  clip-path: inset(100%);
  clip: rect(1px, 1px, 1px, 1px);
  height: 1px;
  width: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;

del::before {
  content: " [deletion start] ";

del::after {
  content: " [deletion end] ";

ins::before {
  content: " [insertion start] ";

ins::after {
  content: " [insertion end] ";

/* Screen-reader styles in Spanish */
:root:lang(es) del::before {
  content: " [inicio de eliminación] ";

:root:lang(es) del::after {
  content: " [fin de eliminación] ";

:root:lang(es) ins::before {
  content: " [inicio de inserción] ";

:root:lang(es) ins::after {
  content: " [fin de inserción] ";

/* Windows High Contrast Mode styles */
@media screen and (-ms-high-contrast: active) {
  ins {
    border-bottom-color: Highlight;

/* Print styles */
@media print {
  ins {
    border-bottom-width: 3pt;

🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.