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.

              <!-- Icons by Peter Nowell -->

<p>This shows one approach to creating SVG sprites. By wrapping each graphic in a symbol element, you can reference it as many times as you'd like anywhere on the webpage, using a use element. This approach to SVG sprites is well supported across browsers.</p>

<!--  No need for width, height, or ViewBox on the SVG element, but definitely include the display:none CSS to prevent the SVG from taking up blank space on the webpage  -->

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" style="display:none;">
  <symbol id="tablet-checkmark" viewBox="0 0 50 73">
		<title>Tablet Check Icon</title>
		<rect id="device-body" fill="#404248" x="4" y="4" width="42" height="65" rx="4"/>
		<rect id="device-screen" fill="#DAF3FF" x="6" y="12" width="38" height="49"/>
		<circle id="home-button" fill="none" stroke="#B3B3B3" cx="25" cy="65" r="1.5"/>
		<path id="checkmark" d="M17 36L23 42 37 28" fill="none" stroke="#404248" stroke-width="2" stroke-linejoin="round"/>
	<symbol id="phone-checkmark" viewBox="0 0 34 73">
		<rect fill="#404248" x="4" y="18" width="26" height="51" rx="4"/>
		<rect fill="#DAF3FF" x="6" y="26" width="22" height="35"/>
		<circle fill="none" stroke="#B3B3B3" cx="17" cy="65" r="1.5"/>
		<path fill="none" d="M11,44 L15,48 L23,40" stroke="#404248" stroke-width="2" stroke-linejoin="round"/>

<!-- Meanwhile, elsewhere in the HTML document... -->

<svg class="tablet-icon">
	<use xlink:href="#tablet-checkmark"></use>

<svg class="phone-icon">
	<use xlink:href="#phone-checkmark"></use>

              .tablet-icon {
	width: 50px;
	height: 73px;

.phone-icon {
	width: 34px;
	height: 73px;

/* Make sure to set the correct width and height on the SVG that contains <use>, otherwise the icon may show up at the wrong size */

p {
	margin: 40px 0;

body {
	font-family: Avenir, sans-serif;
	color: #404248;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	padding: 10px;
	max-width: 600px;
	margin: 10px auto;
Loading ..................