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.
<h1><i>Star Trek: Lower Decks</i> cast and characters</h1>
<p><a href="#mariner" onclick="document.querySelector(this.getAttribute('href')).open = true">Tawny Newsome</a>, <a href="#boimler" onclick="document.querySelector(this.getAttribute('href')).open = true">Jack Quaid</a>, <a href="#tendi" onclick="document.querySelector(this.getAttribute('href')).open = true">Noël Wells</a>, and <a href="#rutherford" onclick="document.querySelector(this.getAttribute('href')).open = true">Eugene Cordero</a> voice the lower decks crew members of the <i><a href="#cerritos">Cerritos</a></i>, with <a href="#freeman" onclick="document.querySelector(this.getAttribute('href')).open = true">Dawnn Lewis</a>, <a href="#ransom" onclick="document.querySelector(this.getAttribute('href')).open = true">Jerry O’Connell</a>, <a href="#shaxs" onclick="document.querySelector(this.getAttribute('href')).open = true">Fred Tatasciore</a>, and <a href="#tana" onclick="document.querySelector(this.getAttribute('href')).open = true">Gillian Vigman</a> providing voices for the ship’s senior officers.</p>
<section>
<h2>Lower deckers</h2>
<details id="mariner">
<summary>Tawny Newsome as Beckett Mariner</summary>
<p>A human ensign aboard the USS <i>Cerritos</i> and the daughter of Captain Freeman. Newsome described Mariner as an irreverent rule-breaker who has been demoted several times, though she is actually “very good at all things Starfleet”. She is promoted to lieutenant (junior grade) in the fourth season.</p>
</details>
<details id="boimler">
<summary>Jack Quaid as Brad Boimler</summary>
<p>A human ensign aboard the <i>Cerritos</i>, Boimler is a stickler for the rules and will need to learn how to improvise if he is to become a captain one day. He is promoted to lieutenant (junior grade) in the fourth season. Quaid said the character would “nail the written portion of the driving test with flying colors but once it actually got to him being in the car, it would be a complete and total disaster.”</p>
</details>
<details id="tendi">
<summary>Noël Wells as D’Vana Tendi</summary>
<p>An Orion ensign in the medical bay aboard the <i>Cerritos</i>, Tendi is a big fan of Starfleet, and is thrilled to be on a starship. She is new to the <i>Cerritos</i> at the start of the series, and helps introduce the audience to the setting and characters. McMahan said he would act like Tendi if he ever got to work on a starship. She is promoted to lieutenant (junior grade) in the fourth season.</p>
</details>
<details id="rutherford">
<summary>Eugene Cordero as Sam Rutherford</summary>
<p>A human ensign aboard the <i>Cerritos</i>, Rutherford is adjusting to a new cyborg implant. McMahan compared Rutherford to the <i>Star Trek: The Next Generation</i> character Geordi La Forge, saying they are both “amazing at engineering stuff” but Rutherford does not always solve the problem like Geordi because he is still learning. He is promoted to lieutenant (junior grade) in the fourth season.</p>
</details>
</section>
<section>
<h2>Upper deckers</h2>
<details name="upper-deckers" id="freeman">
<summary>Dawnn Lewis as Carol Freeman</summary>
<p>The human captain of the <i>Cerritos</i> and Mariner’s mother. McMahan described her as a capable Starfleet captain whose starship is not very important. Freeman does not want Mariner to be on the Cerritos and is looking for a reason to have her transferred to another ship.</p>
</details>
<details name="upper-deckers" id="ransom">
<summary>Jerry O’Connell as Jack Ransom</summary>
<p>The human first officer of the <i>Cerritos</i> whom McMahan compared to <i>Next Generation</i>’s William Riker, if he was on speed and had less shame.</p>
</details>
<details name="upper-deckers" id="shaxs">
<summary>Fred Tatasciore as Shaxs</summary>
<p>A Bajoran tactical officer aboard the <i>Cerritos</i>. At the end of the first season, Shaxs dies sacrificing himself for Rutherford but returns in the second season in a storyline that plays on the numerous times and ways that characters have been resurrected in previous <i>Star Trek series</i>.</p>
</details>
<details name="upper-deckers" id="tana">
<summary>Gillian Vigman as T’Ana</summary>
<p>A Caitian doctor and head of medical aboard the <i>Cerritos</i>. McMahan described her as a “good doctor, but she’s an unpleasant cat”. Including a Caitian in the series is a reference to <i>Star Trek: The Animated Series</i> which also features a member of that species, M’Ress.</p>
</details>
</section>
body {
font: 1em/1.4 Lato, sans-serif;
margin: 0 2em;
}
h1 {
font-size: 1.5em;
line-height: 1.1;
margin-block: 1em 0;
}
h2 {
font-size: 1.3em;
line-height: 1.1;
margin-block: 1em 0.5em;
}
p {
margin-block: 0.25em 0.5em;
padding-bottom: 0.25em;
max-width: 48ch;
details:not(:last-of-type) & {
border-bottom: thin solid silver;
}
}
i a {
color: red;
}
Also see: Tab Triggers