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 URL's added here will be added as <link>
s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.
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.
If the stylesheet 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 CSS 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.
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 Skypack, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ES6 import
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.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Holidays in NYC</title>
</head>
<body style="margin: 0; padding: 0;">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td style="padding: 10px 0 30px 0;">
<table
align="center"
border="0"
cellpadding="0"
cellspacing="0"
width="600"
style="border: 1px solid #cccccc; border-collapse: collapse;"
>
<tr>
<td
align="center"
bgcolor="#acb8bd"
style="padding: 40px 0 30px 0; color: #153643; font-size: 14px; font-weight: normal; font-family: Arial, sans-serif;"
>
<header>
<img src="https://i.imgur.com/p6kROA3.png" />
</header>
<h1>Seasons Greetings to one and all!</h1>
<p>
Visiting New York is fun, especially during the holidays.
Thankfully, the city itself makes sure to put together its
<a href="https://www.nycgo.com/">official guide</a> of things
to do in and around the city. Now, when I say the city I mean
<strong>all 5 boroughs</strong>. Check out some of our
favorite things to do in the Bronx, Brooklyn, Manhattan,
Queens and Staten Island. Which is your favorite?
</p>
</td>
</tr>
<!--Lines 43-154 relate to the Bronx-->
<tr>
<td bgcolor="#ffffff" style="padding: 40px 30px 40px 30px;">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td
style="color: #153643; font-family: Arial, sans-serif; font-size: 24px; background-color: rgba(208, 144, 144, 0.968)"
>
<b>Bronx</b>
</td>
</tr>
<tr>
<td
style="padding: 20px 0 30px 0; color: #153643; font-family: Arial, sans-serif; font-size: 16px; line-height: 20px;"
>
The Bronx is known for being home of the New York Yankees,
the Bronx Zoo and the Botanical Gardens. As the only
borough on the U.S. mainland not many people are willing
to make the trip uptown to check out its appeal for many
of its residents, including yours truly.
</td>
</tr>
<tr>
<td>
<table
border="0"
cellpadding="0"
cellspacing="0"
width="100%"
>
<tr>
<td width="260" valign="top">
<table
border="0"
cellpadding="0"
cellspacing="0"
width="100%"
>
<tr>
<td>
<h3>
Holiday Train Show
</h3>
<a
href="https://www.nybg.org/event/holiday-train-show/"
target="_blank"
>
<img
src="https://i.imgur.com/2ga6AVX.jpg"
alt="New York Holiday Train Show"
width="100%"
height="140"
style="display: block;"
/></a>
</td>
</tr>
<tr>
<td
style="padding: 25px 0 0 0; color: #153643; font-family: Arial, sans-serif; font-size: 16px; line-height: 20px;"
>
Running from November 23, 2019 - January 26,
2020 at the New York Botanical Garden, this
show has become a staple of the Bronx and NYC
as a whole.
</td>
</tr>
</table>
</td>
<td style="font-size: 0; line-height: 0;" width="20">
</td>
<td width="260" valign="top">
<table
border="0"
cellpadding="0"
cellspacing="0"
width="100%"
>
<tr>
<td>
<h3>Holiday Paint & Sip</h3>
<a
href="https://www.meetup.com/The-Artizfacts-Studio-Gallery-Hub/events/zzbnfryzqbcc/"
target="_blank"
>
<img
src="https://i.imgur.com/HMyPwKA.jpg"
alt="Holiday Paint & Sip Social at Artizfacts Studio Gallery Hub"
width="100%"
height="140"
style="display: block;"
/></a>
</td>
</tr>
<tr>
<td
style="padding: 25px 0 0 0; color: #153643; font-family: Arial, sans-serif; font-size: 16px; line-height: 20px;"
>
Taking place on December 21, 2019, take in the
sounds of Salsa, Jazz and R&B while your
creativity shines through.
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
Also see: Tab Triggers