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 CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

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.

              <button onclick="showNewtorkInformation();">Show Network Information</button>

<p class="message information"></p>

<p class="message error noAPI">
  You browser does not support <span>navigator.connection</span>

<p class="message error incompleteAPI">
  You browser has incomplete implementation of <span>navigator.connection</span>. Things like <span>navigator.connection.type</span> and <span>navigator.connection.downlinkMax</span> are used in this demo.
              .message {
  padding: 20px;
  line-height: 2;
  border: 1px solid #f2f2f2;
  display: none;
  &.error {
    border: 1px solid #e60000;
    background: #ffb3b3;
    color: #e60000;
  a {
    text-decoration: none;
    color: white;
    font-weight: bold;
  span {
    border: 1px solid white;
    border-radius: 5px;
    padding: 5px;
    background: #f2f2f2;

.show {
  display: block;

button {
  display: block;
  width: 50%;
  height: 50px;
  margin: 20px auto;
  background:  #99ff99;
  border: 1px solid #00e600;
  color: #008000;
  cursor: pointer;
              function showNewtorkInformation() {
  if(!navigator.connection) {

  if(!navigator.connection.type || !navigator.connection.downlinkMax) {
  let text = `
    Connection type as obtained from
    : ${navigator.connection.type}.
    Connection downlink as obtained from
    : ${navigator.connection.downlinkMax}.
    Connection effective type as obtained from
    : ${navigator.connection.effectiveType}.
    Connection RTT as obtained from
    : ${navigator.connection.rtt}.
      .innerHTML = text;
    // Handle Change in type or downlink information
      .addEventListener('change', showNewtorkInformation);

function showMessage(classname) {
Loading ..................