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 xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 400" width="1000" height="400" preserveAspectRatio="xMidYMid meet">
<defs>
<mask id="text-mask">
<rect width="100%" height="100%" fill="#ffffff"></rect>
<text transform="translate(500, 200)" text-anchor="middle" font-size="72" font-family="Georgia" font-style="italic" fill="#000000"
stroke="#000000" stroke-width="40" stroke-linejoin="round">
<tspan x="0" dy="-18">
<tspan x="0">Ben Moore Hotel & Malden</tspan>
<tspan x="0" dy="72">Brothers Barber Shop</tspan>
</tspan>
</text>
</mask>
</defs>
<g style="mask: url('#text-mask');">
<path fill="#ee572f" d="M454.998 319.349c.862 3.005 1.442 6.122 2.625 8.993 4.078 9.872 8.378 19.65 12.579 29.47 2.625 6.14.873 11.295-5.015 14.622-4.588 2.596-9.626 3.475-14.805 3.44-2.988-.018-5.97-.48-8.952-.768-3.457-.334-5.607-2.297-6.615-5.536-1.277-4.12-2.484-8.261-3.714-12.397-.533-1.787-1.031-3.58-1.553-5.373-.205.006-.41.018-.615.024-.152.943-.187 1.927-.48 2.83-.416 1.282-.803 2.677-1.6 3.714-1.564 2.039-3.591 1.916-5.056-.246-2.086-3.076-2.607-6.55-1.681-10.09.644-2.46 1.605-4.874 2.724-7.158 1.863-3.814 5.138-4.682 8.49-2.069 5.7 4.441 8.77 10.44 8.658 17.676-.134 8.94 2.754 11.665 11.525 10.083 2.302-.416 4.558-1.078 6.866-1.476 1.869-.323 2.437-1.477 2.285-3.111-.1-1.078-.281-2.215-.727-3.187-1.066-2.326-2.18-4.64-3.503-6.826-5.718-9.444-8.87-19.867-11.425-30.471-.609-2.52-.398-5.443.194-8.003.96-4.148 6.321-6.69 10.188-5.138 12.59 5.044 25.732 6.38 39.06 5.091 14.418-1.394 28.766-3.48 43.155-5.22 18.614-2.256 37.238-4.4 56.045-3.867.557.018 1.113-.088 1.857-.152-.984-4.734-2.18-9.269-2.841-13.874-1.395-9.702-2.484-19.445-3.75-29.158-.293-2.239.246-4.195 1.453-6.03 2.449-3.731 4.962-7.422 7.323-11.213 1.313-2.103 2.514-4.3 3.504-6.573 2.513-5.765 1.588-11.044-2.238-16.053-4.88-6.392-9.726-12.837-14.23-19.492-7.06-10.429-10.675-22.158-11.185-34.666-.615-14.987-.686-29.997-1.02-44.995-.24-10.686-.515-21.367-.814-32.053-.023-.844-.234-1.764-.621-2.514-6.937-13.621-12.32-27.823-16.018-42.663-.07-.275-.164-.545-.105-.363-7.283 0-14.377-.14-21.46.023-21.883.516-43.748 1.717-65.648.258-13.37-.89-26.768-1.295-40.144-2.003-.86-.047-1.962-.663-2.472-1.36-4.892-6.708-2.074-14.781 5.982-16.873 2.138-.556 4.505-.539 6.737-.38 6.556.45 13.095 1.154 19.645 1.67 23.98 1.891 47.988 1.792 72.01 1.042a925.843 925.843 0 0 1 21.723-.416c4.125-.03 8.22.41 11.864 2.613 2.777 1.676 4.869 3.925 5.76 7.171 4.182 15.244 8.489 30.454 12.502 45.74.802 3.051.68 6.391.715 9.602.21 21.308.363 42.616.51 63.924.11 16.176 3.573 31.397 13.047 44.813 2.566 3.639 5.83 6.785 8.354 10.446 5.46 7.933 8.32 16.64 6.216 26.365-1.037 4.816-3.31 8.964-7.376 12.092-6.087 4.687-7.68 11.378-6.755 18.508 1.412 10.88 3.445 21.671 5.115 32.516.51 3.316.925 6.679.984 10.024.035 2.068-.486 4.218-1.107 6.222-1.055 3.38-1.172 3.345-4.617 3.322-20.095-.135-40.08 1.646-60.075 3.31-12.696 1.055-25.374 2.308-38.076 3.217-14.858 1.06-29.446.14-42.886-7.394-.182.111-.346.228-.516.34z"></path><path fill="#ee572f" d="M397.097 354.138c-.586-16.159-3.68-31.977-6.07-47.901-.96-6.41-.756-12.995-1.095-19.498-1.483-28.632-1.307-57.257 1.33-85.807 1.171-12.66 3.339-25.24 5.255-37.824.773-5.068 2.22-10.03 3.117-15.086 3.679-20.734 6.79-41.591 11.096-62.19 1.845-8.83 1.383-17.606 2.314-26.37.358-3.322 1.078-6.498 3.404-9.081 1.178-1.307 2.373-2.338 4.353-1.711 1.975.62 2.437 2.127 2.63 3.878.042.364.03.733.007 1.096-1.793 28.672-5.959 57.029-11.196 85.25-2.367 12.749-5.396 25.404-7.2 38.228-4.969 35.258-6.451 70.639-3.791 106.248.966 12.995 2.577 25.72 5.66 38.334 1.698 6.96 3.14 13.985 4.551 21.015.545 2.718.82 5.507.967 8.278.082 1.606.762 2.443 2.05 3.258 1.91 1.2 3.832 2.49 5.414 4.072 3.802 3.802 2.7 9.444-2.256 11.512-5.278 2.203-10.604 2.015-15.695-.68-3.234-1.71-4.957-4.44-4.863-8.213.065-2.268.018-4.535.018-6.808z"></path>
</g>
<text transform="translate(500, 200)" text-anchor="middle" font-size="72" font-family="Georgia" font-style="italic" fill="#ffffff">
<tspan x="0" dy="-18">
<tspan x="0">Ben Moore Hotel & Malden</tspan>
<tspan x="0" dy="72">Brothers Barber Shop</tspan>
</tspan>
</text>
</svg>
html {
height: 100%;
}
body {
background: #222;
display: flex;
align-content: center;
justify-content: center;
height: 100%;
}
svg {
height: auto;
width: 100%;
}
Also see: Tab Triggers