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. You can use the CSS from another Pen by using it's URL and the proper URL extention.
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 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.
<div class="menu">
<h1 class="title">
<span>Russ</span>
<span class="ampersand">&</span>
<span>Daughters</span>
</h1>
<main class="menu-items">
<hr class="top-bar" />
<aside id="appetizing">
<span>Appetizing</span>
<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/244137/fish.svg" class="logo" />
<span>since 1924</span>
</aside>
<section class="menu-group" id="noshes">
<aside class="section-highlight">
<span class="secondary-highlight">small</span>
<span class="primary-highlight vertical-bar">dishes</span>
</aside>
<h1 class="section-title brackets ">Noshes</h1>
<dl>
<dt>
russ <span class="ampersand">&</span> Daughters Knishes
<strong class="price">8</strong>
</dt>
<dd>Potato, carmelized onion, mustard</dd>
<hr class="dotted-bar" />
<dt>Hot Smoke/Cold Smoke <strong class="price">13</strong></dt>
<dd>
Kippered baked Salmon & Scottish smoked salmon spread, waffle-cut potato chips
</dd>
<hr class="dotted-bar" />
<dt>Potato latkes</dt>
<dd>
- Salmon roe and creme fraiche <strong class="price">9</strong>
</dd>
<dd>
- Applesauce and sour cream <strong class="price">9</strong>
</dd>
<hr class="dotted-bar" />
<dt>Kasha Varnishkas <strong class="price">6</strong></dt>
<dd>
buckwheat, caramelized onion, bowtie egg noodles
</dd>
<hr class="dotted-bar" />
<dt>Chopped liver <strong class="price">9</strong></dt>
<dd>Matzo, pickled red onion</dd>
<hr class="dotted-bar" />
<dt>Super heebster <strong class="price">10</strong></dt>
<dd>
whitefish & baked salmon salad, wasabi-infused fish roe, horseradish dill cream cheese, bagel toast
</dd>
<hr class="dotted-bar" />
<dt>Pastrami russ <strong class="price">12</strong></dt>
<dd>
pastrami-cured salmon, muenster cheese, sauerkraut, mustard, pickle, pretzel roll
</dd>
<hr class="dotted-bar" />
<dt>sours <strong class="price">7</strong></dt>
<dd>
pickled vegetables, pickles from the barrel
</dd>
</dl>
</section>
<section class="menu-group" id="boards">
<aside class="section-highlight">
<span class="secondary-highlight">open-faced</span>
<span class="primary-highlight vertical-bar">sandwiches</span>
</aside>
<h1 class="section-title brackets ">boards</h1>
<dl>
<dt>the classic <strong class="price">16</strong></dt>
<dd>
gaspe nova smoked salmon, cream cheese, bagel-bialy, tomato, onion, capers
</dd>
<hr class="dotted-bar" />
<dt>mensch <strong class="price">22</strong></dt>
<dd>
sturgeon, butter, bagel/bialy, tomato, onion, capers
</dd>
<hr class="dotted-bar" />
<dt>shtetl <strong class="price">18</strong></dt>
<dd>
smoked sable, goat cream cheese, bagel-bialy, tomato, onion, capers
</dd>
<hr class="dotted-bar" />
<dt>yum kippered <strong class="price">16</strong></dt>
<dd>
kippered (baked) salmon, cream cheese, bagel/bialy, tomato, onion, capers
</dd>
</dl>
</section>
<section class="menu-group" id="platters">
<div class="section-highlight">
<span class="secondary-highlight">to be</span>
<span class="primary-highlight vertical-bar">shared</span>
</div>
<h1 class="section-title brackets ">platters</h1>
<h3 class="text-center smoked-fish">smoked fish</h3>
<p>
<span class="serves">| Serves 3 - 4 people |</span>
<span class="italic">with</span> cream cheese, onion, tomato, capers & new potato salad <span class="italic">and</span> russ
<span class="ampersand">&</span> daughters bread basket
</p>
<dl>
<dt>
<span class="italic">the</span> hattie
<strong class="price">80</strong>
</dt>
<dd>
smoked whitefish, kippered (baked) salmon, gaspe nova smoked salmon, sable
</dd>
<hr class="dotted-bar" />
<dt>
<span class="italic">the</span> ida
<strong class="price">70</strong>
</dt>
<dd>
scottish smoked salmon, gaspe nova smoked salmon, pastrami-cured salmon, gravlox
</dd>
<hr class="dotted-bar" />
<dt>
<span class="italic">the</span> anne
<strong class="price">90</strong>
</dt>
<dd>
western nova smoked salmon, private stock sturgeon, sable, smoked brook trout, wild alaskan salmon roe
</dd>
</dl>
</section>
<section class="menu-group" id="eggs">
<aside class="section-highlight">
<span class="secondary-highlight">served</span>
<span class="primary-highlight vertical-bar">all the time</span>
</aside>
<div class="quote-grid">
<h1 class="section-title brackets ">eggs</h1>
<blockquote>
<p class="yiddish">"Ess gezinter hayt."</p>
<p class="translation">Eat in good health.</p>
<cite>— Yiddish idiom</cite>
</blockquote>
</div>
<dl>
<dt>Lox, eggs & onions <strong class="price">15</strong></dt>
<dd><span class="italic">with</span> toasted shissel rye</dd>
<hr class="dotted-bar" />
<dt>sturgeon, eggs & onion <strong class="price">19</strong></dt>
<dd><span class="italic">with</span> toasted pumpernickel</dd>
<hr class="dotted-bar" />
<dt>bella's matzo brei <strong class="price">12</strong></dt>
<dd>matzo, egg, applesauce, sour cream</dd>
<hr class="dotted-bar" />
<dt>lower sunny side <strong class="price">16</strong></dt>
<dd>
sunny side up eggs, gaspe nova smoked salmon, potato latkes
</dd>
<hr class="dotted-bar" />
<dt>eggs benny <strong class="price">18</strong></dt>
<dd>
poached eggs, scottish smoked salmon, sautéed spinach, hollandaise, challah
</dd>
<hr class="dotted-bar" />
<dt>farm egg omelette <strong class="price">15</strong></dt>
<dd>gaspe nova smoked salmon, cream cheese</dd>
<hr class="dotted-bar" />
<dt>soft scrambled eggs & caviar</dt>
<dd>
custard-like egg, caviar <span class="italic">with</span> challah
</dd>
<dd>- American transmontanus <strong class="price">180</strong></dd>
<dd>
- paddlefish
<strong class="price">60</strong>
</dd>
<div class="bread-container">
<dt class="bread-title">
russ <span class="ampersand">&</span> Daughters Bread basket
<strong class="price">7</strong>
</dt>
<dd class="bread-description">
bagel, bialy, shissel rye, onion roll, pumpernickel
</dd>
</div>
</dl>
</section>
<section class="menu-group relative" id="soup">
<h1 class="section-title">soups</h1>
<dl>
<dt>Matzo Ball <strong class="price">8</strong></dt>
<dd>chicken, vegetables, matzo ball</dd>
<hr class="dotted-bar" />
<dt>Mushroom Barley <strong class="price">8</strong></dt>
<dd>
mushrooms, barley <span class="italic">w/</span> shissel rye bread
</dd>
<hr class="dotted-bar" />
<dt>Borscht <strong class="price">8</strong></dt>
<dd>
served chilled: beets, sour cream, dill
<span class="italic">w/</span> pumpernickel
</dd>
<hr class="dotted-bar" />
<dt>Smoked Whitefish Chowder <strong class="price">10</strong></dt>
<dd>dill, esplette pepper, matzo</dd>
</dl>
</section>
<section class="menu-group" id="salad">
<h1 class="section-title">salads</h1>
<dl>
<dt>Mixed Green <strong class="price">9</strong></dt>
<dd>
greens, fennel, dill, capers, citrus dressing
</dd>
<hr class="dotted-bar" />
<dt>Chopped Salad <strong class="price">14</strong></dt>
<dd>
smoked whitefish, avocado, beets, egg, apple, mixed greens, matzo, buttermilk dressing
</dd>
<hr class="dotted-bar" />
<dt>
Smoked Trout<span class="ampersand">&</span> Potato
<strong class="price">14</strong>
</dt>
<dd>
smoked trout, watercress, caper mustard dressing
</dd>
</dl>
</section>
<section class="menu-group" id="herring">
<h1 class="section-title brackets ">herring</h1>
<dl>
<dt>pickled herring trio <strong class="price">9</strong></dt>
<dd>
canapes of pickled herring on pumpernickel
</dd>
<hr class="dotted-bar" />
<dt>schmaltz & a shot <strong class="price">12</strong></dt>
<dd>
schmaltz herring, boiled potato, raw onion, shot of vodka
</dd>
<hr class="dotted-bar" />
<dt>herring plate <strong class="price">20</strong></dt>
<dd>
an assortment of russ & daughters herring
</dd>
</dl>
</section>
<section class="menu-group" id="caviar">
<h1 class="section-title brackets ">caviar</h1>
<p class="caviar-description">blini, creme fraiche, accoutrement</p>
<table class="caviar-grid center">
<tr>
<th class="grams">Grams</th>
<th class="top-row">50</th>
<th class="top-row">125</th>
<th class="top-row">250</th>
<th class="top-row">500</th>
</tr>
<tr>
<th>american <br />transmontanus</th>
<td>175</td>
<td>345</td>
<td>650</td>
<td>1125</td>
</tr>
<tr>
<th>siberian baerri</th>
<td>175</td>
<td>345</td>
<td>650</td>
<td>1125</td>
</tr>
<tr>
<th>ostetra <br />gueldenstaedtii</th>
<td>255</td>
<td>550</td>
<td>1045</td>
<td>1970</td>
</tr>
<tr>
<th>paddlefish</th>
<td>105</td>
<td>175</td>
<td>305</td>
<td>470</td>
</tr>
<tr>
<th>hackleback</th>
<td>115</td>
<td>200</td>
<td>355</td>
<td>570</td>
</tr>
</table>
</section>
<section class="menu-group brackets relative m-10" id="sweet">
<h1 class="section-title">sweet</h1>
<blockquote>
<p class="yiddish">
"A moltsayt on a tsimes iz via a mayse on a moshl."
</p>
<p class="translation inline">
A meal without a sweet dish is like a story without a moral.
</p>
<cite class="inline">— Yiddish idiom</cite>
</blockquote>
<dl>
<dt>blintzes <strong class="price">8</strong></dt>
<dd>fruit compote, sour cream</dd>
<dt>babka french toast <strong class="price">10</strong></dt>
<dd>chocolate babka, sour cream, berries</dd>
<dt>noodle kugel <strong class="price">7</strong></dt>
<dd>farmer cheese, raisins, egg noodles</dd>
<dt>challah bread pudding <strong class="price">9</strong></dt>
<dd>dried apricots, caramel sauce</dd>
<dt>halvah ice cream <strong class="price">8</strong></dt>
<dd>halvah, sesame, salted caramel</dd>
<dt>grandpa's grapefruit <strong class="price">6</strong></dt>
<dd>grapefruit, white germ, maple syrup</dd>
<dt>baked farmer cheese <strong class="price">7</strong></dt>
<dd>
blueberry, walnut & honey
<span class="italic">w/</span> pumpernickel
</dd>
<dt>cookie plate <strong class="price">8</strong></dt>
<dd>russ & daughters cookies & sweets</dd>
</dl>
</section>
</main>
</div>
:root {
--gray: rgb(65, 65, 64);
--blue: rgb(43, 161, 224);
--body: rgb(125, 126, 120);
--page-inset: 16px;
--double-bar: 5px double var(--blue);
--section-title-size: 60px;
color: var(--body);
font-family: "Source Sans Pro";
text-transform: uppercase;
font-size: 11px;
letter-spacing: 1.1px;
}
.menu {
overflow-x: hidden;
}
.menu-items {
padding: var(--page-inset);
}
.menu-group {
display: flex;
flex-direction: column;
justify-content: space-between;
}
p {
line-height: 1.3;
}
/* utilities */
.ampersand {
font-size: 0.7em;
}
.italic {
text-transform: initial;
font-style: italic;
font-family: "Zilla Slab";
}
.text-center {
text-align: center;
}
.center {
margin-left: auto;
margin-right: auto;
}
.relative {
position: relative;
}
.inline {
display: inline;
}
.m-10 {
margin: 10px;
}
/* title styles */
.top-bar {
border-bottom: var(--double-bar);
border-top: none;
border-left: none;
border-right: none;
margin: 0 -16px;
}
.title {
font-family: "Josefin Sans", sans-serif;
display: flex;
align-items: center;
justify-content: space-between;
margin: 24px -1.15vw 0;
font-size: 10.65vw;
color: var(--gray);
}
/* appetizing styles */
#appetizing {
font-size: 10px;
font-family: "Josefin Sans", sans-serif;
color: var(--gray);
text-align: center;
position: relative;
display: flex;
align-items: center;
justify-content: center;
}
.logo {
height: 20px;
width: 20px;
padding: 0 8px 6px;
display: block;
}
/* section highlight styles */
.section-highlight {
text-align: center;
position: relative;
display: grid;
justify-items: center;
margin-bottom: 8px;
align-content: bottom;
}
.section-highlight:after {
left: 0;
right: 50%;
}
.section-highlight:before {
right: 0;
left: 50%;
}
.primary-highlight {
font-family: "Josefin Sans", sans-serif;
color: var(--gray);
letter-spacing: 2px;
font-size: 14px;
background: white;
padding: 6px 12px 0;
z-index: 2;
white-space: nowrap;
}
.secondary-highlight {
color: var(--blue);
font-family: "Zilla Slab";
font-style: italic;
letter-spacing: 1px;
text-transform: initial;
background: white;
z-index: 2;
white-space: nowrap;
}
.vertical-bar:after {
content: "•";
display: block;
height: 6px;
padding: 24px 0 0 3px;
margin-top: 4px;
font-size: 0.75em;
background-image: radial-gradient(circle, black 1px, transparent 1px);
background-repeat: repeat-y;
background-size: 1px 4px;
background-position: center;
}
/* section title styles */
.section-title {
position: relative;
margin: 0 auto calc(var(--section-title-size) / 2);
color: var(--blue);
font-family: "Barlow Condensed", sans-serif;
font-size: var(--section-title-size);
letter-spacing: 0.025em;
transform: scaleY(1.4);
display: flex;
}
/* bracket styles */
.brackets:before,
.brackets:after {
content: "";
position: absolute;
width: 4px;
border-top: 1px solid var(--gray);
border-bottom: 1px solid var(--gray);
top: 8px;
bottom: 2px;
}
.brackets:before {
border-left: 1px solid var(--gray);
left: -10px;
}
.brackets:after {
border-right: 1px solid var(--gray);
right: -10px;
}
/* menu item styles */
dt {
font-family: "Josefin Sans", sans-serif;
color: var(--gray);
font-size: 13px;
}
dt:first-of-type {
border-top: none;
}
dd {
padding-top: 4px;
line-height: 1.3;
}
dd + dd {
padding-top: 0;
}
.dotted-bar {
border-bottom: 1px dotted var(--body);
border-top: none;
border-left: none;
border-right: none;
margin: 8px 0;
width: 100%;
}
.price:before {
content: "|";
margin: 0 6px 0 4px;
color: var(--body);
font-weight: 400;
font-family: initial;
}
/* smoked fish */
.smoked-fish {
font-size: 16px;
color: var(--gray);
font-family: "Josefin Sans", sans-serif;
letter-spacing: 4px;
}
.serves {
color: var(--gray);
font-family: "Zilla Slab", monospace;
text-transform: none;
}
/* soup salad styles */
#soup:after {
content: "&";
position: absolute;
color: var(--blue);
opacity: 0.3;
bottom: -100px;
font-size: 250px;
font-family: "Josefin Sans", sans-serif;
left: 50%;
transform: translateX(-50%);
}
#soup {
padding-bottom: 96px;
}
#soup h1,
#salad h1 {
font-size: calc(var(--section-title-size) / 1.75);
margin: calc(var(--section-title-size) / 4) auto;
}
#soup dt,
#salad dt {
font-family: "Sorts Mill Goudy", serif;
text-transform: initial;
font-weight: 600;
font-size: 18px;
letter-spacing: 0.75px;
}
#soup dl,
#salad dl {
text-align: center;
}
#soup .price:before,
#salad .price:before {
content: "";
padding: 0;
}
#soup .price,
#salad .price {
font-family: "Josefin Sans", sans-serif;
font-size: 14px;
}
/* bread styles */
.bread-container {
position: relative;
margin: 24px 0 0 0;
padding: 24px 0;
}
.bread-title,
.bread-description {
width: 80%;
margin: auto;
}
.bread-title:before {
content: "";
position: absolute;
height: 8px;
top: 6px;
border-top: 1px solid var(--gray);
border-left: 1px solid var(--gray);
border-right: 1px solid var(--gray);
left: 0;
right: 0;
}
.bread-title:after {
content: "";
position: absolute;
height: 8px;
bottom: 6px;
border-bottom: 1px solid var(--gray);
border-left: 1px solid var(--gray);
border-right: 1px solid var(--gray);
left: 0;
right: 0;
}
.bread-container:before {
content: "";
position: absolute;
height: 14px;
top: 0;
left: 8px;
right: 8px;
border-top: 1px solid var(--gray);
border-left: 1px solid var(--gray);
border-right: 1px solid var(--gray);
}
.bread-container:after {
content: "";
position: absolute;
height: 14px;
bottom: 0;
left: 8px;
right: 8px;
border-bottom: 1px solid var(--gray);
border-left: 1px solid var(--gray);
border-right: 1px solid var(--gray);
}
/* quote styles */
blockquote {
color: var(--gray);
text-transform: initial;
font-style: italic;
}
.yiddish {
font-family: "Zilla Slab", monospace;
color: var(--blue);
font-size: 16px;
line-height: 1.3;
padding-bottom: 4px;
}
.translation {
margin-bottom: 4px;
}
cite {
font-family: "Zilla Slab", monospace;
}
/* caviar table styles */
.caviar-description {
text-align: center;
padding-bottom: 24px;
}
.grams {
border: 2px solid var(--blue);
color: var(--blue);
display: inline;
padding: 3px 3px 0 3px;
font-family: "Josefin Sans", sans-serif;
}
table {
width: 100%;
}
tbody {
display: grid;
grid-template-columns: auto 1fr 1fr 1fr 1fr;
grid-gap: 16px;
justify-items: end;
text-align: right;
}
tr {
display: contents;
}
td {
font-family: "Josefin Sans", sans-serif;
color: var(--gray);
position: relative;
width: 100%;
}
td:not(:last-of-type):after {
content: "•";
color: var(--blue);
position: absolute;
right: -45%;
}
.top-row {
border-bottom: 4px solid var(--blue);
color: var(--gray);
font-family: "Josefin Sans", sans-serif;
align-self: end;
/* alignment goes here */
}
/* layout styles */
.menu-items {
display: grid;
grid-gap: 48px;
}
@media (min-width: 1000px) {
.menu-items {
grid-template-columns: 1.5fr 1.5fr 1fr 1.5fr 1.5fr
}
.top-bar {
grid-column: 1 / -1;
grid-row: 1 / 2;
}
#noshes {
grid-column: 1 / 2;
grid-row: 1 / 4;
}
#boards {
grid-column: 2 / 3;
grid-row: 1 / 3;
}
#appetizing {
grid-column: 3 /4 ;
grid-row: 1 / 2;
transform: translateY(12px);
background-color: white;
white-space: nowrap;
padding: 0 16px;
}
#platters {
grid-column: 4 /5;
grid-row: 1 / 3;
}
#eggs {
grid-column: 5 / 6;
grid-row: 1 / 4;
}
#soup {
grid-column: 3 / 4;
grid-row: 2 / 3;
}
#salad {
grid-column: 3/ 4;
grid-row: 3 / 4;
}
#caviar {
grid-column: 2 / 3;
grid-row: 3 / 4
}
#herring {
grid-column: 4 /5;
grid-row: 3 / 4;
}
dl {
display: contents;
}
.quote-grid {
display: grid;
grid-auto-flow: column;
grid-gap: 16px;
}
#sweet {
grid-column: 1 / -1;
display: grid;
grid-template-columns: 1fr 1fr 1.75fr 1.75fr 1.75fr 1.75fr;
grid-template-rows: repeat(4, 1fr);
grid-auto-flow: column;
grid-gap: 0 16px;
}
#sweet h1,
#sweet blockquote {
grid-row: 1 / 5;
align-self: center;
margin: 0;
}
#sweet dt {
align-self: end;
}
}
Also see: Tab Triggers