HTML preprocessors can make writing HTML more powerful or convenient. For instance, Markdown is designed to be easier to write and read for text documents and you could write a loop in Pug.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. So you don't have access to higher-up elements like the <html>
tag. If you want to add classes there that can affect the whole document, this is the place to do it.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. If you need things in the <head>
of the document, put that code here.
The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https.
CSS preprocessors help make authoring CSS easier. All of them offer things like variables and mixins to provide convenient abstractions.
It's a common practice to apply CSS to a page that styles elements such that they are consistent across all browsers. We offer two of the most popular choices: normalize.css and a reset. Or, choose Neither and nothing will be applied.
To get the best cross-browser support, it is a common practice to apply vendor prefixes to CSS properties and values that require them to work. For instance -webkit-
or -moz-
.
We offer two popular choices: Autoprefixer (which processes your CSS server-side) and -prefix-free (which applies prefixes via a script, client-side).
Any URLs added here will be added as <link>
s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.
You can apply CSS to your Pen from any stylesheet on the web. Just put a URL to it here and we'll apply it, in the order you have them, before the CSS in the Pen itself.
You can also link to another Pen here (use the .css
URL Extension) and we'll pull the CSS from that Pen and include it. If it's using a matching preprocessor, use the appropriate URL Extension and we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
JavaScript preprocessors can help make authoring JavaScript easier and more convenient.
Babel includes JSX processing.
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.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
Search for and use JavaScript packages from npm here. By selecting a package, an import
statement will be added to the top of the JavaScript editor for this package.
Using packages here is powered by esm.sh, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ESM usage.
All packages are different, so refer to their docs for how they work.
If you're using React / ReactDOM, make sure to turn on Babel for the JSX processing.
If active, Pens will autosave every 30 seconds after being saved once.
If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.
If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.
Visit your global Editor Settings.
<div>
<figure>
<svg viewBox="450 800 2500 1500" shape-rendering="optimizeSpeed">
<use xlink:href="#abanico" />
</svg>
<figcaption>shape-rendering="optimizeSpeed"</figcaption>
</figure>
<figure>
<svg viewBox="450 800 2500 1500" shape-rendering="geometricPrecision">
<use xlink:href="#abanico" />
</svg>
<figcaption>shape-rendering="geometricPrecision"</figcaption>
</figure>
</div>
<svg viewBox="450 800 2500 1500" style="width:0;height:0;display:none;">
<g id="abanico">
<path d="M1700.609,2228.346c-8.284,0-15-6.716-15-15V896.552c0-8.284,6.716-15,15-15s15,6.716,15,15v1316.794
C1715.609,2221.63,1708.894,2228.346,1700.609,2228.346z"/>
<path d="M1812.378,2142.031c-1.255,0-2.529-0.159-3.801-0.491L534.522,1808.778
c-8.016-2.093-12.816-10.288-10.723-18.304c2.094-8.016,10.29-12.815,18.304-10.722l1274.056,332.762
c8.015,2.093,12.815,10.288,10.722,18.304C1825.12,2137.562,1819.038,2142.031,1812.378,2142.031z"/>
<path d="M1796.131,2177.763c-2.903,0-5.835-0.84-8.417-2.595L698.604,1435.04
c-6.852-4.656-8.631-13.985-3.975-20.837c4.656-6.851,13.985-8.632,20.837-3.975l1089.108,740.128
c6.853,4.656,8.632,13.985,3.976,20.837C1805.649,2175.463,1800.932,2177.763,1796.131,2177.763z"/>
<path d="M1768.905,2206.002c-4.616,0-9.171-2.124-12.11-6.134L978.35,1137.81
c-4.897-6.682-3.451-16.068,3.23-20.966c6.682-4.898,16.068-3.451,20.966,3.23l778.446,1062.06
c4.897,6.682,3.45,16.068-3.231,20.966C1775.089,2205.058,1771.983,2206.002,1768.905,2206.002z"/>
<path d="M1733.755,2223.49c-6.454,0-12.416-4.199-14.363-10.699L1341.466,951.396
c-2.377-7.936,2.128-16.296,10.064-18.674c7.938-2.379,16.296,2.128,18.674,10.063l377.926,1261.396
c2.377,7.936-2.128,16.296-10.064,18.674C1736.63,2223.285,1735.181,2223.49,1733.755,2223.49z"/>
<path d="M1586.484,2142.031c-6.66,0-12.741-4.469-14.503-11.213c-2.093-8.016,2.707-16.211,10.723-18.304
l1274.055-332.762c8.019-2.097,16.211,2.708,18.304,10.722c2.094,8.016-2.707,16.211-10.722,18.304L1590.285,2141.54
C1589.015,2141.872,1587.739,2142.031,1586.484,2142.031z"/>
<path d="M1602.731,2177.763c-4.801,0-9.518-2.3-12.42-6.57c-4.657-6.852-2.876-16.181,3.975-20.837
l1089.11-740.128c6.851-4.656,16.182-2.876,20.837,3.975c4.656,6.852,2.877,16.181-3.976,20.837l-1089.109,740.128
C1608.567,2176.923,1605.634,2177.763,1602.731,2177.763z"/>
<path d="M1629.957,2206.002c-3.078,0-6.183-0.943-8.855-2.902c-6.682-4.897-8.128-14.284-3.23-20.966
l778.445-1062.06c4.897-6.683,14.284-8.128,20.966-3.23s8.129,14.284,3.231,20.966l-778.446,1062.059
C1639.129,2203.877,1634.574,2206.002,1629.957,2206.002z"/>
<path d="M1665.108,2223.49c-1.426,0-2.875-0.205-4.311-0.635c-7.936-2.378-12.441-10.738-10.064-18.674
l377.926-1261.396c2.377-7.935,10.74-12.444,18.674-10.063c7.937,2.377,12.441,10.738,10.064,18.674l-377.926,1261.396
C1677.524,2219.291,1671.562,2223.49,1665.108,2223.49z"/>
<path d="M1243.578,1993.471c-1.278,0-2.577-0.165-3.871-0.51c-8.005-2.132-12.766-10.351-10.633-18.355
c13.833-51.927,36.018-100.999,65.94-145.854c29.443-44.137,65.61-83.066,107.498-115.708
c42.317-32.977,89.343-58.643,139.77-76.284c52.169-18.251,106.898-27.506,162.669-27.506c55.526,0,110.029,9.175,161.995,27.271
c50.233,17.492,97.113,42.949,139.339,75.662c41.788,32.374,77.933,71.005,107.432,114.819
c29.966,44.509,52.293,93.234,66.361,144.822c2.18,7.992-2.533,16.238-10.525,18.418c-7.991,2.182-16.238-2.533-18.418-10.525
c-13.206-48.426-34.168-94.17-62.304-135.961c-27.709-41.156-61.664-77.445-100.919-107.858
c-39.653-30.72-83.671-54.624-130.831-71.045c-48.787-16.988-99.971-25.602-152.13-25.602
c-52.389,0-103.786,8.688-152.762,25.823c-47.343,16.563-91.497,40.663-131.237,71.631
c-39.349,30.663-73.324,67.232-100.981,108.692c-28.094,42.114-48.923,88.184-61.907,136.928
C1256.274,1989.039,1250.208,1993.471,1243.578,1993.471z"/>
<path d="M1812.378,2142.031c-1.255,0-2.529-0.159-3.8-0.49L1700,2113.182l-108.578,28.359
c-8.016,2.088-16.21-2.708-18.304-10.723c-2.093-8.016,2.708-16.211,10.723-18.304l56.801-14.836l-1106.12-288.899
c-4.754-1.242-8.6-4.734-10.292-9.348c-1.692-4.613-1.018-9.763,1.806-13.785l117.739-167.701l48.69-198.878
c0.873-3.563,3.02-6.683,6.037-8.77l179.018-123.829l100.097-165.296c1.946-3.214,5.028-5.581,8.635-6.631l205.795-59.961
l154.621-119.363c2.625-2.026,5.849-3.126,9.166-3.126h186.592l149.275-48.419c2.26-1.351,4.896-2.12,7.689-2.12h1.218
c2.793,0,5.429,0.769,7.689,2.12l149.274,48.418h186.592c3.317,0,6.54,1.1,9.166,3.126l154.622,119.364l205.795,59.96
c3.607,1.051,6.688,3.417,8.635,6.631l100.097,165.296l179.018,123.829c3.017,2.087,5.164,5.207,6.036,8.769l48.691,198.879
l117.738,167.701c2.824,4.022,3.498,9.172,1.806,13.785s-5.537,8.105-10.292,9.348l-1106.119,288.899l56.801,14.836
c8.016,2.093,12.816,10.288,10.723,18.304C1825.12,2137.562,1819.037,2142.03,1812.378,2142.031z M562.998,1785.21L1700,2082.176
l1137.001-296.966l-106.951-152.337c-1.072-1.527-1.85-3.24-2.294-5.052l-48.008-196.089l-176.972-122.415
c-1.738-1.202-3.203-2.759-4.298-4.567l-98.731-163.041l-202.91-59.121c-1.8-0.524-3.485-1.381-4.97-2.527L2039.049,962.09
h-183.847c-1.571,0-3.133-0.247-4.628-0.732L1700,912.519l-150.574,48.84c-1.495,0.485-3.057,0.732-4.628,0.732h-183.847
l-152.818,117.971c-1.484,1.146-3.17,2.003-4.97,2.527l-202.911,59.121l-98.731,163.041c-1.095,1.808-2.56,3.365-4.298,4.567
l-176.972,122.415l-48.008,196.089c-0.444,1.812-1.221,3.525-2.293,5.052L562.998,1785.21z"/>
<path d="M1269.581,1920.44c-2.096,0-4.225-0.441-6.254-1.374l-611.916-281.183
c-7.527-3.459-10.826-12.365-7.367-19.893c3.459-7.527,12.366-10.826,19.893-7.367l611.916,281.183
c7.527,3.459,10.826,12.365,7.367,19.893C1280.693,1917.198,1275.259,1920.44,1269.581,1920.44z"/>
<path d="M1355.836,1791.019c-3.902,0-7.8-1.513-10.74-4.527l-467.145-479.038
c-5.784-5.931-5.664-15.428,0.267-21.212c5.931-5.784,15.426-5.665,21.212,0.267l467.145,479.038
c5.784,5.932,5.664,15.428-0.267,21.212C1363.391,1789.602,1359.612,1791.019,1355.836,1791.019z"/>
<path d="M1489.729,1690.412c-5.594,0-10.963-3.143-13.54-8.525l-290.751-607.221
c-3.578-7.472-0.421-16.429,7.051-20.007c7.473-3.578,16.429-0.42,20.007,7.051l290.751,607.221
c3.578,7.472,0.421,16.429-7.051,20.007C1494.106,1689.938,1491.9,1690.412,1489.729,1690.412z"/>
<path d="M1629.95,1639.255c-7.45,0-13.91-5.545-14.864-13.129l-85.171-677.164
c-1.034-8.22,4.792-15.721,13.011-16.755c8.223-1.03,15.721,4.791,16.755,13.011l85.171,677.164
c1.034,8.22-4.792,15.721-13.011,16.755C1631.206,1639.216,1630.574,1639.255,1629.95,1639.255z"/>
<path d="M2140.838,1920.44c-5.645,0-11.05-3.201-13.599-8.651c-3.508-7.505-0.269-16.433,7.236-19.941
l601.498-281.182c7.507-3.51,16.432-0.27,19.941,7.236c3.508,7.504,0.269,16.433-7.236,19.94l-601.498,281.183
C2145.126,1919.985,2142.965,1920.44,2140.838,1920.44z"/>
<path d="M2054.581,1791.019c-3.72,0-7.444-1.374-10.349-4.144c-5.996-5.717-6.223-15.211-0.506-21.207
l456.727-479.038c5.717-5.997,15.212-6.223,21.207-0.506c5.996,5.717,6.223,15.211,0.506,21.207l-456.727,479.038
C2062.492,1789.461,2058.539,1791.019,2054.581,1791.019z"/>
<path d="M1920.69,1690.412c-2.104,0-4.241-0.445-6.277-1.385c-7.521-3.472-10.804-12.384-7.332-19.906
l280.333-607.221c3.474-7.521,12.384-10.804,19.906-7.332c7.521,3.472,10.804,12.385,7.332,19.906l-280.333,607.221
C1931.786,1687.182,1926.36,1690.412,1920.69,1690.412z"/>
<path d="M1780.468,1639.255c-0.624,0-1.255-0.039-1.891-0.119c-8.22-1.034-14.045-8.535-13.011-16.755
l85.172-677.164c1.034-8.219,8.532-14.047,16.755-13.011c8.22,1.034,14.045,8.535,13.011,16.755l-85.172,677.164
C1794.378,1633.71,1787.918,1639.255,1780.468,1639.255z"/>
</g>
</svg>
div {
display: flex;
}
#elTrazado {
fill: none;
stroke-width: 1px;
}
svg {
background: white;
border: thin #d9d9d9 solid;
}
figure {
background: #f9f9f9;
border: thin #d9d9d9 solid;
padding: 10px;
flex: 1 1 50%;
margin: 5px;
display: inline-block;
}
figcaption {
font: italic smaller sans-serif;
padding: 3px;
text-align: center;
}
Also see: Tab Triggers