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 viewBox="0 0 600 200" xmlns="http://www.w3.org/2000/svg">
<defs>
<clipPath id="clip-0">
<path d="M 150.5302 97.345 L 249.2964 97 L 249.3174 103 L 150.5512 103.345 L 150.5302 97.345 Z M 150.4244 100.9732 C 150.4244 115.3819 144.2899 129.0978 134.875 138.5127 C 125.4602 147.9275 111.7443 154.062 97.3356 154.062 C 82.9269 154.062 69.211 147.9275 59.7961 138.5127 C 50.3813 129.0978 44.2468 115.3819 44.2468 100.9732 C 44.2468 86.5645 50.3813 72.8486 59.7961 63.4338 C 69.211 54.0189 82.9269 47.8844 97.3356 47.8844 C 111.7443 47.8844 125.4602 54.0189 134.875 63.4338 C 144.2899 72.8486 150.4244 86.5645 150.4244 100.9732 Z M 129.9253 68.3835 C 121.3926 59.8508 110.3141 54.8844 97.3356 54.8844 C 84.3571 54.8844 73.2786 59.8508 64.7459 68.3835 C 56.2132 76.9163 51.2468 87.9947 51.2468 100.9732 C 51.2468 113.9517 56.2132 125.0302 64.7459 133.5629 C 73.2787 142.0957 84.3571 147.062 97.3356 147.062 C 110.3141 147.062 121.3926 142.0957 129.9253 133.5629 C 138.458 125.0302 143.4244 113.9517 143.4244 100.9732 C 143.4244 87.9947 138.458 76.9162 129.9253 68.3835 Z M 352.5431 98.814 C 352.5431 113.2227 346.4086 126.9386 336.9938 136.3535 C 327.5789 145.7683 313.863 151.9028 299.4543 151.9028 C 285.0456 151.9028 271.3297 145.7683 261.9149 136.3535 C 252.5 126.9386 246.3655 113.2227 246.3655 98.814 C 246.3655 84.4053 252.5 70.6894 261.9149 61.2746 C 271.3297 51.859700000000004 285.0456 45.7252 299.4543 45.7252 C 313.863 45.7252 327.5789 51.859700000000004 336.9938 61.2746 C 346.4086 70.6894 352.5431 84.4053 352.5431 98.814 Z M 332.044 66.2243 C 323.5113 57.6916 312.4328 52.7252 299.4543 52.7252 C 286.4759 52.7252 275.3974 57.6916 266.8646 66.2243 C 258.3319 74.757 253.3655 85.8355 253.3655 98.814 C 253.3655 111.7925 258.3319 122.871 266.8646 131.4037 C 275.3974 139.9364 286.4759 144.9028 299.4543 144.9028 C 312.4328 144.9028 323.5113 139.9364 332.044 131.4037 C 340.5768 122.871 345.5431 111.7925 345.5431 98.814 C 345.5431 85.8355 340.5768 74.757 332.044 66.2243 Z M 349.37 97.345 L 448.1362 97 L 448.1572 103 L 349.391 103.345 L 349.37 97.345 Z M 552.5031 98.9085 C 552.5031 113.3172 546.3686 127.0331 536.9538 136.448 C 527.5389 145.8628 513.823 151.9973 499.4143 151.9973 C 485.0056 151.9973 471.2897 145.8628 461.8749 136.448 C 452.46 127.0331 446.3255 113.3172 446.3255 98.9085 C 446.3255 84.4998 452.46 70.7839 461.8749 61.369 C 471.2897 51.9542 485.0056 45.8197 499.4143 45.8197 C 513.823 45.8197 527.5389 51.9542 536.9538 61.369 C 546.3686 70.7839 552.5031 84.4998 552.5031 98.9085 Z M 532.004 66.3188 C 523.4713 57.7861 512.3928 52.8197 499.4143 52.8197 C 486.4358 52.8197 475.3574 57.7861 466.8246 66.3188 C 458.2919 74.8516 453.3255 85.93 453.3255 98.9085 C 453.3255 111.887 458.2919 122.9655 466.8246 131.4982 C 475.3574 140.031 486.4359 144.9973 499.4143 144.9973 C 512.3928 144.9973 523.4713 140.031 532.004 131.4982 C 540.5368 122.9655 545.5031 111.887 545.5031 98.9085 C 545.5031 85.93 540.5368 74.8515 532.004 66.3188 Z" style=""></path>
</clipPath>
</defs>
<path d="M 150.7184 97.4537 L 249.4846 97.1087 L 249.5056 103.1087 L 150.7394 103.4537 L 150.7184 97.4537 Z M 150.6126 101.0819 C 150.6126 115.4906 144.4781 129.2065 135.0632 138.6214 C 125.6484 148.0362 111.9325 154.1707 97.5238 154.1707 C 83.1151 154.1707 69.3992 148.0362 59.9843 138.6214 C 50.5695 129.2065 44.435 115.4906 44.435 101.0819 C 44.435 86.6732 50.5695 72.9573 59.9843 63.5425 C 69.3992 54.1276 83.1151 47.9931 97.5238 47.9931 C 111.9325 47.9931 125.6484 54.1276 135.0632 63.5425 C 144.4781 72.9573 150.6126 86.6732 150.6126 101.0819 Z M 130.1135 68.4922 C 121.5808 59.9595 110.5023 54.9931 97.5238 54.9931 C 84.5453 54.9931 73.4668 59.9595 64.9341 68.4922 C 56.4014 77.025 51.435 88.1034 51.435 101.0819 C 51.435 114.0604 56.4014 125.1389 64.9341 133.6716 C 73.4669 142.2044 84.5453 147.1707 97.5238 147.1707 C 110.5023 147.1707 121.5808 142.2044 130.1135 133.6716 C 138.6462 125.1389 143.6126 114.0604 143.6126 101.0819 C 143.6126 88.1034 138.6462 77.0249 130.1135 68.4922 Z M 352.7313 98.9227 C 352.7313 113.3314 346.5968 127.0473 337.182 136.4622 C 327.7671 145.877 314.0512 152.0115 299.6425 152.0115 C 285.2338 152.0115 271.5179 145.877 262.1031 136.4622 C 252.6882 127.0473 246.5537 113.3314 246.5537 98.9227 C 246.5537 84.514 252.6882 70.7981 262.1031 61.3833 C 271.5179 51.9684 285.2338 45.8339 299.6425 45.8339 C 314.0512 45.8339 327.7671 51.9684 337.182 61.3833 C 346.5968 70.7981 352.7313 84.514 352.7313 98.9227 Z M 332.2322 66.333 C 323.6995 57.8003 312.621 52.8339 299.6425 52.8339 C 286.6641 52.8339 275.5856 57.8003 267.0528 66.333 C 258.5201 74.8657 253.5537 85.9442 253.5537 98.9227 C 253.5537 111.9012 258.5201 122.9797 267.0528 131.5124 C 275.5856 140.0451 286.6641 145.0115 299.6425 145.0115 C 312.621 145.0115 323.6995 140.0451 332.2322 131.5124 C 340.765 122.9797 345.7313 111.9012 345.7313 98.9227 C 345.7313 85.9442 340.765 74.8657 332.2322 66.333 Z M 349.5582 97.4537 L 448.3244 97.1087 L 448.3454 103.1087 L 349.5792 103.4537 L 349.5582 97.4537 Z M 552.6913 99.0172 C 552.6913 113.4259 546.5568 127.1418 537.142 136.5567 C 527.7271 145.9715 514.0112 152.106 499.6025 152.106 C 485.1938 152.106 471.4779 145.9715 462.0631 136.5567 C 452.6482 127.1418 446.5137 113.4259 446.5137 99.0172 C 446.5137 84.6085 452.6482 70.8926 462.0631 61.4777 C 471.4779 52.0629 485.1938 45.9284 499.6025 45.9284 C 514.0112 45.9284 527.7271 52.0629 537.142 61.4777 C 546.5568 70.8926 552.6913 84.6085 552.6913 99.0172 Z M 532.1922 66.4275 C 523.6595 57.8948 512.581 52.9284 499.6025 52.9284 C 486.624 52.9284 475.5456 57.8948 467.0128 66.4275 C 458.4801 74.9603 453.5137 86.0387 453.5137 99.0172 C 453.5137 111.9957 458.4801 123.0742 467.0128 131.6069 C 475.5456 140.1397 486.6241 145.106 499.6025 145.106 C 512.581 145.106 523.6595 140.1397 532.1922 131.6069 C 540.725 123.0742 545.6913 111.9957 545.6913 99.0172 C 545.6913 86.0387 540.725 74.9602 532.1922 66.4275 Z" style="fill: rgb(217, 217, 217);"></path>
<g style="clip-path: url(#clip-0);">
<rect id="orange" x="42.1608" y="37.9043" width="519.6147" height="120.397" style="fill: rgb(255, 174, 0); "></rect>
</g>
</svg>
gsap.from("#orange", {scaleX:0, duration:4, ease:"none"})
GSDevTools.create()
// learn SVG Animation with GSAP, ScrollTrigger and so much more.
// https://www.creativeCodingClub.com
Also see: Tab Triggers