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.

            
              <button type="button">
  <svg width="100%" height="100%" viewBox="0 0 300 300" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" pointer-events="none">
    <title>Save</title>
    <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
        <path d="M75.75,272.702381 L223.25,272.702381 L223.25,198.952381 L75.75,198.952381 L75.75,272.702381 Z M247.833333,272.702381 L272.416667,272.702381 L272.416667,100.619048 C272.416667,98.8265039 271.776482,96.3617933 270.496094,93.2248419 C269.215705,90.0878904 267.935336,87.8792537 266.654948,86.5988653 L212.686849,32.6307664 C211.406461,31.350378 209.229833,30.0700089 206.156901,28.7896205 C203.083969,27.5092322 200.587249,26.8690476 198.666667,26.8690476 L198.666667,106.764881 C198.666667,111.886434 196.87415,116.239689 193.289063,119.824777 C189.703975,123.409864 185.35072,125.202381 180.229167,125.202381 L69.6041667,125.202381 C64.4826133,125.202381 60.1293582,123.409864 56.5442708,119.824777 C52.9591835,116.239689 51.1666667,111.886434 51.1666667,106.764881 L51.1666667,26.8690476 L26.5833333,26.8690476 L26.5833333,272.702381 L51.1666667,272.702381 L51.1666667,192.806548 C51.1666667,187.684994 52.9591835,183.331739 56.5442708,179.746652 C60.1293582,176.161564 64.4826133,174.369048 69.6041667,174.369048 L229.395833,174.369048 C234.517387,174.369048 238.870642,176.161564 242.455729,179.746652 C246.040817,183.331739 247.833333,187.684994 247.833333,192.806548 L247.833333,272.702381 Z M174.083333,94.4732143 L174.083333,33.014881 C174.083333,31.3503761 173.475158,29.9099608 172.258789,28.6935919 C171.04242,27.477223 169.602005,26.8690476 167.9375,26.8690476 L131.0625,26.8690476 C129.397995,26.8690476 127.95758,27.477223 126.741211,28.6935919 C125.524842,29.9099608 124.916667,31.3503761 124.916667,33.014881 L124.916667,94.4732143 C124.916667,96.1377191 125.524842,97.5781344 126.741211,98.7945033 C127.95758,100.010872 129.397995,100.619048 131.0625,100.619048 L167.9375,100.619048 C169.602005,100.619048 171.04242,100.010872 172.258789,98.7945033 C173.475158,97.5781344 174.083333,96.1377191 174.083333,94.4732143 Z M297,100.619048 L297,278.848214 C297,283.969768 295.207483,288.323023 291.622396,291.90811 C288.037308,295.493197 283.684053,297.285714 278.5625,297.285714 L20.4375,297.285714 C15.3159466,297.285714 10.9626915,295.493197 7.37760417,291.90811 C3.7925168,288.323023 2,283.969768 2,278.848214 L2,20.7232143 C2,15.6016609 3.7925168,11.2484058 7.37760417,7.66331845 C10.9626915,4.07823108 15.3159466,2.28571429 20.4375,2.28571429 L198.666667,2.28571429 C203.78822,2.28571429 209.421844,3.56608343 215.567708,6.12686012 C221.713572,8.68763681 226.578975,11.7605227 230.164062,15.3456101 L283.940104,69.1216518 C287.525192,72.7067392 290.598077,77.5721419 293.158854,83.718006 C295.719631,89.86387 297,95.4974942 297,100.619048 Z" id="save-icon" fill="#000000"></path>
    </g>
</svg></button>
            
          
!
            
              button {
  display: flex;
  padding: .25em;
  width: 10rem;
  height: 10rem;
  margin: 2rem auto;
}
            
          
!
            
              document.querySelector('button').addEventListener('click', (event) => {
  alert(`${event.target.nodeName.toUpperCase()} element`);
})
            
          
!
999px
Loading ..................

Console