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.
<svg width="300" height="100%" viewBox="0 0 240 236" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
<g>
<path fill="transparent" class="white" d="M82.724,236L156.605,236C160.698,236 161.95,235.538 165.084,232.908C184.043,217 203.001,201.091 221.96,185.184C224.473,183.074 225.335,181.895 225.91,178.636C230.324,153.605 234.736,128.573 239.151,103.543C239.6,101 239.211,99.557 237.932,97.34C225.127,75.16 212.32,52.981 199.516,30.802C198.645,29.293 197.587,28.067 195.912,27.458C171.728,18.655 147.545,9.853 123.361,1.051C122.166,0.616 120.943,0.314 119.665,0.314C118.387,0.314 117.164,0.616 115.969,1.051C91.785,9.853 67.602,18.655 43.418,27.458C41.743,28.067 40.686,29.293 39.814,30.802C27.009,52.981 14.203,75.16 1.398,97.34C0.119,99.557 -0.269,101 0.178,103.543C4.593,128.573 9.006,153.605 13.42,178.636C13.995,181.895 14.857,183.074 17.37,185.184C36.329,201.091 55.287,217 74.246,232.908C77.379,235.538 78.631,236 82.724,236ZM135.138,230.537L104.193,230.537C100.299,230.537 96.221,230.687 92.346,230.407C88.267,230.111 86.373,228.121 90.229,223.162L95.044,216.972L109.498,198.391L115.81,190.276C117.37,188.27 118.706,188.874 119.665,188.874C120.624,188.874 121.96,188.27 123.521,190.276L129.832,198.391L144.286,216.972L149.101,223.162C152.957,228.121 151.063,230.111 146.984,230.407C143.109,230.687 139.031,230.537 135.138,230.537ZM188.394,42.368C190.606,36.924 191.467,31.623 184.769,29.186C172.997,24.902 156.415,18.896 144.644,14.611C141.528,13.478 138.16,12.208 134.937,11.447C132.227,10.808 128.323,10.637 130.261,14.863C131.83,18.282 133.9,21.721 135.782,24.981C141.234,34.426 155.121,58.453 160.573,67.897C162.545,71.313 164.52,74.731 166.491,78.146C171.313,86.501 172.302,81.957 176.76,70.986C180.638,61.447 184.516,51.907 188.394,42.368ZM179.643,95.716C178.613,95.574 177.594,96.344 178.541,98.382C179.753,100.993 181.343,103.552 182.784,106.05C189.515,117.707 204.893,144.852 211.622,156.509C213.589,159.917 215.442,163.48 217.534,166.804C219.03,169.181 222.169,168.437 222.706,165.385L225.784,147.927L231.298,116.663C231.659,114.611 232.149,112.542 232.443,110.487C232.687,108.789 232.767,107.012 231.881,105.47C230.308,102.733 226.295,102.171 223.46,101.779C215.267,100.646 197.086,98.13 188.893,96.997C185.811,96.57 182.726,96.142 179.643,95.716ZM177.213,83.827C174.798,89.768 176.647,89.811 182.949,90.682C184.903,90.953 186.859,91.224 188.814,91.494C197.286,92.667 209.726,94.389 218.197,95.56C220.776,95.917 225.85,96.882 227.461,94.136C228.475,92.408 227.605,90.424 226.771,88.83C225.701,86.782 224.419,84.776 223.261,82.77C216.109,70.382 208.957,57.996 201.806,45.608C200.79,43.849 199.22,41.873 196.938,42.133C194.846,42.373 193.646,44.348 192.815,46.063C191.919,47.917 191.211,49.912 190.435,51.823C187.991,57.833 182.826,70.538 180.383,76.549C179.19,79.483 178.406,80.892 177.213,83.827ZM130.128,112.402L136.932,108.474L152.697,99.372L162.06,93.966C167.816,90.643 167.192,90.24 163.836,84.426C162.469,82.058 161.101,79.688 159.733,77.321C152.35,64.532 139.429,42.37 132.045,29.581C130.746,27.333 129.235,24.787 127.529,22.825C125.421,19.521 122.626,18.225 122.577,25.149C122.328,30.531 122.482,36.04 122.482,41.433L122.482,110.708C122.482,115.89 126.517,114.62 130.128,112.402ZM132.552,117.283C127.607,120.138 126.409,122.25 131.378,125.118C133.67,126.441 136.188,127.894 138.867,129.439C155.721,139.157 184.428,155.688 198.845,164.011C202.552,166.15 206.334,168.441 210.163,170.343C212.561,171.532 212.721,169.098 209.922,164.249C207.642,160.299 205.359,156.349 203.08,152.399C197.521,142.772 184.488,120.196 177.384,107.892C175.744,105.053 174.242,102.45 172.96,100.229C170.059,95.204 168.316,96.635 163.228,99.573L156.773,103.3L139.672,113.173L132.552,117.283ZM122.482,133.321L122.482,169.846C121.82,175.589 125.119,178.274 131.035,178.274L192.341,178.274C196.527,178.274 197.981,178.34 202.153,178.033C213.904,177.6 206.016,174.467 201.267,171.726C196.905,169.208 192.544,166.689 188.183,164.173C176.267,157.293 151.529,143.012 136.815,134.516C134.215,133.015 131.795,131.616 129.634,130.369C125.018,127.703 122.482,127.093 122.482,133.321ZM129.802,183.698C126.065,183.698 126.587,185.339 129.162,188.651L141.168,204.144L146.867,211.499C157.141,224.758 158.435,230.546 173.229,218.294L191.135,203.884L203.606,193.554C215.387,183.797 214.146,183.807 203.858,183.673C199.586,183.617 195.303,183.698 191.027,183.698L129.802,183.698ZM50.936,42.368C48.723,36.924 47.863,31.623 54.561,29.186C66.333,24.902 82.915,18.896 94.687,14.611C97.802,13.478 101.169,12.208 104.394,11.447C107.104,10.808 111.007,10.637 109.068,14.863C107.5,18.282 105.43,21.721 103.548,24.981C98.095,34.426 84.209,58.453 78.756,67.897C76.785,71.313 74.81,74.731 72.839,78.146C68.017,86.501 67.028,81.957 62.569,70.986C58.692,61.447 54.814,51.907 50.936,42.368ZM59.687,95.716C60.717,95.574 61.735,96.344 60.789,98.382C59.576,100.993 57.987,103.552 56.545,106.05C49.815,117.707 34.437,144.852 27.708,156.509C25.741,159.917 23.888,163.48 21.795,166.804C20.299,169.181 17.161,168.437 16.623,165.385L13.546,147.927L8.032,116.663C7.671,114.611 7.181,112.542 6.886,110.487C6.644,108.789 6.563,107.012 7.449,105.47C9.022,102.733 13.035,102.171 15.87,101.779C24.063,100.646 42.244,98.13 50.437,96.997C53.52,96.57 56.604,96.142 59.687,95.716ZM62.117,83.827C64.532,89.768 62.683,89.811 56.381,90.682C54.426,90.953 52.471,91.224 50.516,91.494C42.043,92.667 29.605,94.389 21.133,95.56C18.553,95.917 13.481,96.882 11.869,94.136C10.856,92.408 11.724,90.424 12.558,88.83C13.629,86.782 14.911,84.776 16.069,82.77C23.22,70.382 30.373,57.996 37.524,45.608C38.54,43.849 40.11,41.873 42.393,42.133C44.484,42.373 45.684,44.348 46.514,46.063C47.411,47.917 48.119,49.912 48.895,51.823C51.338,57.833 56.504,70.538 58.947,76.549C60.14,79.483 60.924,80.892 62.117,83.827ZM109.203,112.402L102.399,108.474L86.633,99.372L77.27,93.966C71.513,90.643 72.138,90.24 75.494,84.426C76.861,82.058 78.23,79.688 79.596,77.321C86.98,64.532 99.901,42.37 107.286,29.581C108.583,27.333 110.095,24.787 111.801,22.825C113.909,19.521 116.704,18.225 116.753,25.149C117.002,30.531 116.848,36.04 116.848,41.433L116.848,110.708C116.848,115.89 112.813,114.62 109.203,112.402ZM106.778,117.283C111.723,120.138 112.921,122.25 107.953,125.118C105.66,126.441 103.143,127.894 100.463,129.439C83.609,139.157 54.902,155.688 40.485,164.011C36.778,166.15 32.996,168.441 29.167,170.343C26.77,171.532 26.609,169.098 29.408,164.249C31.689,160.299 33.97,156.349 36.25,152.399C41.808,142.772 54.842,120.196 61.946,107.892C63.585,105.053 65.087,102.45 66.37,100.229C69.271,95.204 71.013,96.635 76.103,99.573L82.557,103.3L99.658,113.173L106.778,117.283ZM116.848,133.321L116.848,169.846C117.51,175.589 114.211,178.274 108.294,178.274L46.989,178.274C42.802,178.274 41.349,178.34 37.176,178.033C25.425,177.6 33.314,174.467 38.064,171.726C42.424,169.208 46.786,166.689 51.147,164.173C63.064,157.293 87.801,143.012 102.515,134.516C105.115,133.015 107.536,131.616 109.696,130.369C114.313,127.703 116.848,127.093 116.848,133.321ZM109.527,183.698C113.265,183.698 112.744,185.339 110.167,188.651L98.162,204.144L92.463,211.499C82.189,224.758 80.895,230.546 66.101,218.294L48.195,203.884L35.723,193.554C23.943,183.797 25.184,183.807 35.472,183.673C39.744,183.617 44.027,183.698 48.302,183.698L109.527,183.698Z" />
<path fill="transparent" class="red" d="M82.724,236L156.605,236C160.698,236 161.95,235.538 165.084,232.908C184.043,217 203.001,201.091 221.96,185.184C224.473,183.074 225.335,181.895 225.91,178.636C230.324,153.605 234.736,128.573 239.151,103.543C239.6,101 239.211,99.557 237.932,97.34C225.127,75.16 212.32,52.981 199.516,30.802C198.645,29.293 197.587,28.067 195.912,27.458C171.728,18.655 147.545,9.853 123.361,1.051C122.166,0.616 120.943,0.314 119.665,0.314C118.387,0.314 117.164,0.616 115.969,1.051C91.785,9.853 67.602,18.655 43.418,27.458C41.743,28.067 40.686,29.293 39.814,30.802C27.009,52.981 14.203,75.16 1.398,97.34C0.119,99.557 -0.269,101 0.178,103.543C4.593,128.573 9.006,153.605 13.42,178.636C13.995,181.895 14.857,183.074 17.37,185.184C36.329,201.091 55.287,217 74.246,232.908C77.379,235.538 78.631,236 82.724,236ZM135.138,230.537L104.193,230.537C100.299,230.537 96.221,230.687 92.346,230.407C88.267,230.111 86.373,228.121 90.229,223.162L95.044,216.972L109.498,198.391L115.81,190.276C117.37,188.27 118.706,188.874 119.665,188.874C120.624,188.874 121.96,188.27 123.521,190.276L129.832,198.391L144.286,216.972L149.101,223.162C152.957,228.121 151.063,230.111 146.984,230.407C143.109,230.687 139.031,230.537 135.138,230.537ZM188.394,42.368C190.606,36.924 191.467,31.623 184.769,29.186C172.997,24.902 156.415,18.896 144.644,14.611C141.528,13.478 138.16,12.208 134.937,11.447C132.227,10.808 128.323,10.637 130.261,14.863C131.83,18.282 133.9,21.721 135.782,24.981C141.234,34.426 155.121,58.453 160.573,67.897C162.545,71.313 164.52,74.731 166.491,78.146C171.313,86.501 172.302,81.957 176.76,70.986C180.638,61.447 184.516,51.907 188.394,42.368ZM179.643,95.716C178.613,95.574 177.594,96.344 178.541,98.382C179.753,100.993 181.343,103.552 182.784,106.05C189.515,117.707 204.893,144.852 211.622,156.509C213.589,159.917 215.442,163.48 217.534,166.804C219.03,169.181 222.169,168.437 222.706,165.385L225.784,147.927L231.298,116.663C231.659,114.611 232.149,112.542 232.443,110.487C232.687,108.789 232.767,107.012 231.881,105.47C230.308,102.733 226.295,102.171 223.46,101.779C215.267,100.646 197.086,98.13 188.893,96.997C185.811,96.57 182.726,96.142 179.643,95.716ZM177.213,83.827C174.798,89.768 176.647,89.811 182.949,90.682C184.903,90.953 186.859,91.224 188.814,91.494C197.286,92.667 209.726,94.389 218.197,95.56C220.776,95.917 225.85,96.882 227.461,94.136C228.475,92.408 227.605,90.424 226.771,88.83C225.701,86.782 224.419,84.776 223.261,82.77C216.109,70.382 208.957,57.996 201.806,45.608C200.79,43.849 199.22,41.873 196.938,42.133C194.846,42.373 193.646,44.348 192.815,46.063C191.919,47.917 191.211,49.912 190.435,51.823C187.991,57.833 182.826,70.538 180.383,76.549C179.19,79.483 178.406,80.892 177.213,83.827ZM130.128,112.402L136.932,108.474L152.697,99.372L162.06,93.966C167.816,90.643 167.192,90.24 163.836,84.426C162.469,82.058 161.101,79.688 159.733,77.321C152.35,64.532 139.429,42.37 132.045,29.581C130.746,27.333 129.235,24.787 127.529,22.825C125.421,19.521 122.626,18.225 122.577,25.149C122.328,30.531 122.482,36.04 122.482,41.433L122.482,110.708C122.482,115.89 126.517,114.62 130.128,112.402ZM132.552,117.283C127.607,120.138 126.409,122.25 131.378,125.118C133.67,126.441 136.188,127.894 138.867,129.439C155.721,139.157 184.428,155.688 198.845,164.011C202.552,166.15 206.334,168.441 210.163,170.343C212.561,171.532 212.721,169.098 209.922,164.249C207.642,160.299 205.359,156.349 203.08,152.399C197.521,142.772 184.488,120.196 177.384,107.892C175.744,105.053 174.242,102.45 172.96,100.229C170.059,95.204 168.316,96.635 163.228,99.573L156.773,103.3L139.672,113.173L132.552,117.283ZM122.482,133.321L122.482,169.846C121.82,175.589 125.119,178.274 131.035,178.274L192.341,178.274C196.527,178.274 197.981,178.34 202.153,178.033C213.904,177.6 206.016,174.467 201.267,171.726C196.905,169.208 192.544,166.689 188.183,164.173C176.267,157.293 151.529,143.012 136.815,134.516C134.215,133.015 131.795,131.616 129.634,130.369C125.018,127.703 122.482,127.093 122.482,133.321ZM129.802,183.698C126.065,183.698 126.587,185.339 129.162,188.651L141.168,204.144L146.867,211.499C157.141,224.758 158.435,230.546 173.229,218.294L191.135,203.884L203.606,193.554C215.387,183.797 214.146,183.807 203.858,183.673C199.586,183.617 195.303,183.698 191.027,183.698L129.802,183.698ZM50.936,42.368C48.723,36.924 47.863,31.623 54.561,29.186C66.333,24.902 82.915,18.896 94.687,14.611C97.802,13.478 101.169,12.208 104.394,11.447C107.104,10.808 111.007,10.637 109.068,14.863C107.5,18.282 105.43,21.721 103.548,24.981C98.095,34.426 84.209,58.453 78.756,67.897C76.785,71.313 74.81,74.731 72.839,78.146C68.017,86.501 67.028,81.957 62.569,70.986C58.692,61.447 54.814,51.907 50.936,42.368ZM59.687,95.716C60.717,95.574 61.735,96.344 60.789,98.382C59.576,100.993 57.987,103.552 56.545,106.05C49.815,117.707 34.437,144.852 27.708,156.509C25.741,159.917 23.888,163.48 21.795,166.804C20.299,169.181 17.161,168.437 16.623,165.385L13.546,147.927L8.032,116.663C7.671,114.611 7.181,112.542 6.886,110.487C6.644,108.789 6.563,107.012 7.449,105.47C9.022,102.733 13.035,102.171 15.87,101.779C24.063,100.646 42.244,98.13 50.437,96.997C53.52,96.57 56.604,96.142 59.687,95.716ZM62.117,83.827C64.532,89.768 62.683,89.811 56.381,90.682C54.426,90.953 52.471,91.224 50.516,91.494C42.043,92.667 29.605,94.389 21.133,95.56C18.553,95.917 13.481,96.882 11.869,94.136C10.856,92.408 11.724,90.424 12.558,88.83C13.629,86.782 14.911,84.776 16.069,82.77C23.22,70.382 30.373,57.996 37.524,45.608C38.54,43.849 40.11,41.873 42.393,42.133C44.484,42.373 45.684,44.348 46.514,46.063C47.411,47.917 48.119,49.912 48.895,51.823C51.338,57.833 56.504,70.538 58.947,76.549C60.14,79.483 60.924,80.892 62.117,83.827ZM109.203,112.402L102.399,108.474L86.633,99.372L77.27,93.966C71.513,90.643 72.138,90.24 75.494,84.426C76.861,82.058 78.23,79.688 79.596,77.321C86.98,64.532 99.901,42.37 107.286,29.581C108.583,27.333 110.095,24.787 111.801,22.825C113.909,19.521 116.704,18.225 116.753,25.149C117.002,30.531 116.848,36.04 116.848,41.433L116.848,110.708C116.848,115.89 112.813,114.62 109.203,112.402ZM106.778,117.283C111.723,120.138 112.921,122.25 107.953,125.118C105.66,126.441 103.143,127.894 100.463,129.439C83.609,139.157 54.902,155.688 40.485,164.011C36.778,166.15 32.996,168.441 29.167,170.343C26.77,171.532 26.609,169.098 29.408,164.249C31.689,160.299 33.97,156.349 36.25,152.399C41.808,142.772 54.842,120.196 61.946,107.892C63.585,105.053 65.087,102.45 66.37,100.229C69.271,95.204 71.013,96.635 76.103,99.573L82.557,103.3L99.658,113.173L106.778,117.283ZM116.848,133.321L116.848,169.846C117.51,175.589 114.211,178.274 108.294,178.274L46.989,178.274C42.802,178.274 41.349,178.34 37.176,178.033C25.425,177.6 33.314,174.467 38.064,171.726C42.424,169.208 46.786,166.689 51.147,164.173C63.064,157.293 87.801,143.012 102.515,134.516C105.115,133.015 107.536,131.616 109.696,130.369C114.313,127.703 116.848,127.093 116.848,133.321ZM109.527,183.698C113.265,183.698 112.744,185.339 110.167,188.651L98.162,204.144L92.463,211.499C82.189,224.758 80.895,230.546 66.101,218.294L48.195,203.884L35.723,193.554C23.943,183.797 25.184,183.807 35.472,183.673C39.744,183.617 44.027,183.698 48.302,183.698L109.527,183.698Z" />
</svg>
body {
background: #000;
padding: 20px;
}
.red {
stroke: #DF474F;
stroke-width: 2;
stroke-linecap : round;
stroke-dasharray: 100;
animation: red-anim 40s linear forwards infinite;
}
@keyframes red-anim {
0% {
stroke-dashoffset: 500;
}
50% {
stroke-dashoffset: 1000;
}
100% {
stroke-dashoffset: 500;
}
}
.white {
stroke: #fff;
stroke-width: 1.9;
stroke-linecap : round;
stroke-dasharray: 400;
animation: white-anim 20s linear forwards infinite;
}
@keyframes white-anim {
0% {
stroke-dashoffset: 200;
}
50% {
stroke-dashoffset: 2000;
}
100% {
stroke-dashoffset: 200;
}
}
Also see: Tab Triggers