cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

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.

            
              <h1>Text Level Semantics</h1>

<p>
  For use in my blog post <a href="http://adrianroselli.com/2017/12/tweaking-text-level-styles.html"><cite>Tweaking Text Level Styles</cite></a>.
</p>

<h2><code>&lt;mark&gt;</code></h2>

<p>
  This is some plain text, and this is some <mark>text we are highlighting</mark> by using the <code>mark</code> element.
</p>

<p lang="es">
  Este es un texto simple, y este es un <mark>texto que estamos resaltando</mark> al usar el elemento <code>mark</code>.
</p>

<h2><code>&lt;del&gt;</code></h2>

<p>
  Using the <code>del</code> element on <del>text that we are indicating is deleted</del>.
</p>

<h2><code>&lt;ins&gt;</code></h2>

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

<h2><code>&lt;s&gt;</code></h2>

<p>
  This is an example of <s>text that is no longer relevant</s>. We do this with the <code>s</code> element.
</p>
            
          
!
            
              body {
  background-color: #fff;
}

/* Base styles */
mark {
  background-color: #ff0;
  color: #000;
}

del, s {
  text-decoration: line-through;
}

s {
  text-decoration-color: #f00;
}

ins {
  text-decoration: none;
  border-bottom: .2em double #080;
}

/* Screen-reader styles */
mark::before, mark::after, del::before, del::after, ins::before, ins::after, s::before, s::after {
  clip-path: inset(100%);
  clip: rect(1px, 1px, 1px, 1px);
  height: 1px;
  width: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
}

mark::before {
  content: " [highlight start] ";
}

mark::after {
  content: " [highlight end] ";
}

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

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

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

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

s::before {
  content: " [start of stricken text] ";
}

s::after {
  content: " [end stricken text] ";
}

/* Screen-reader styles in another language */
*[lang=es] mark::before {
  content: " [resaltar inicio] ";
}

*[lang=es] mark::after {
  content: " [resaltar final] ";
}

/* Windows High Contrast Mode styles */
@media screen and (-ms-high-contrast: active) {
  mark {
    color: HighlightText;
    background-color: Highlight;
  }
  
  ins {
    border-bottom-color: Highlight;
  }
  
  s {
    text-decoration-color: Highlight;
  }
}

/* Print styles */
@media print {
  mark {
    border: 1pt dotted #000;
  }
  
  ins {
    border-bottom-width: 3pt;
  }
}

            
          
!
999px
Loading ..................

Console