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.
<pre>
<b>
</b><b> FANTASTIC MR. FOX
</b><b>
</b>
Written by
Roald Dahl, Wes Anderson & Noah Baumbach
March 4, 2007
<b>
</b>
<b>
</b>
<b> EXT. WOODS. DAY
</b>
An apple tree stands alone at the top of a hill. A handsome
fox dressed in an Edwardian-style navy velvet suit leans
against it with his arms folded and his legs crossed, chewing
on a reed of wild grass. He holds an apple core in his paw.
He spits out a seed. He looks off across a meadow that
descends into the valley below.
A female fox strides briskly up the hill. Her coat is a
paler, especially beautiful shade of fox-red, and she wears
men's trousers and a dark tunic. Fox says as she approaches:
<b> FOX
</b> What'd the doctor say?
<b> MRS. FOX
</b> Nothing. Supposedly, it's just a twenty-
four hour bug. He gave me some pills.
<b> FOX
</b>
<b> (REASSURINGLY)
</b> I told you. You probably just ate some
bad gristle.
Fox brushes the fur on Mrs. Fox's ears with his paws. They
walk together along the crest of the hill to a fork in the
path. Fox points:
<b> FOX
</b> Should we take the short cut or the
scenic route?
<b> MRS. FOX
</b> Let's take the short cut.
<b> FOX
</b> But the scenic route is so much prettier.
<b> MRS. FOX
</b>
<b> (SHRUGS)
</b> OK, let's take the scenic route.
<b> FOX
</b> Great. It's actually slightly quicker,
anyway.
Fox throws his apple core away over his shoulder and dances a
quick circle around Mrs. Fox, wrapping his arm around her
waist extravagantly and making her laugh as they start off
down the scenic route.
<b>
</b>
<b>
</b>
<b>
</b>
<b>
</b>
<b> 2.
</b>
<b> EXT. FARM. DAY
</b>
A rustic cottage surrounded by a small barn, a tin silo, and
a rickity windmill. There is a sheep in a little pasture. A
sign on a rail says Berkus Squab. Fox and Mrs. Fox watch from
the bushes outside a fence.
<b> MRS. FOX
</b> What is a squab?
<b> FOX
</b> You know what a squab is. It's like a
pigeon, I suppose. Anyway, it's a type of
bird we can eat.
Fox motions toward the edge of the property.
<b> FOX
</b> Should we go through the hole under the
horse fence or climb the rail over the
bridle path?
<b> MRS. FOX
</b> Well, I guess the horse fence would be a
little safer.
<b> FOX
</b> But the bridle path puts us out right
next to the squab shack.
Mrs. Fox hesitates. She fiddles with her paws. She nods
nervously. She shakes slightly. Fox looks at her funny.
<b> FOX
</b> What's wrong? I've never seen you like
this. You're acting all skittish. Don't
worry. I've been stealing birds for a
living since before I could trot.
<b> MRS. FOX
</b>
<b> (SHRUGS)
</b> OK, let's take the --
<b> FOX
</b> No, we'll do the horse fence. You gave me
the scenic route already.
Fox flashes a smile. He says suddenly:
<b> FOX
</b> By the way, you look unbelievably
beautiful tonight. You're practically
glowing. Maybe it's the lighting.
<b>
</b>
<b>
</b>
<b>
</b>
<b>
</b>
<b> 3.
</b> Mrs. Fox is, in fact, glowing, albeit ever so slightly. She
stares at Fox enigmatically. Fox touches his paw to her
cheek.
(NOTE: an alternate version of Mrs. Fox will be used for this
shot which can be literally lit from within.)
With the speed, grace, and precision of athletes, Fox and
Mrs. Fox: dart through a hole under a painted fence; race
along a thin trail next to a garage; crawl beneath a window
where a blonde woman serves an early dinner, dealing
hamburgers like playing cards to three little, blond
children; creep past a doghouse where a golden retriever
sleeps with an airline sleeping mask over his eyes; and
shimmy over a doorway outside a workshop where a blond,
bearded farmer hacks into a stump with a hatchet, completely
pulverizing it into sawdust. They arrive in front of a wooden
shed. Fox whistles sharply with a half-chirp and performs a
rapid reverse-flip with a flourish.
Fox lifts a loose board. He looks to Mrs. Fox and puts his
finger to his lips for her to be quiet. She shrugs
impatiently. They duck inside.
They come back out. Each holds a dead, bloody pigeon in
his/her teeth. They start to run away. Fox looks up above
them. He stops. He frowns. He takes the pigeon out of his
mouth and says curiously, pointing toward the sky:
<b> FOX
</b> What's that? I think that's a fox-trap!
Look at this.
<b> MRS. FOX
</b> Get away from there.
<b> FOX
</b> Is it spring-loaded? Yeah...
(pointing to different spots)
I guess if you come from over there, and
you're standing at the door to the squab
shack, this little gadget probably
triggers the --
(gesturing to Mrs. Fox)
Move out of the way, darling. That's
right where it's going to land.
Mrs. Fox runs back to Fox and tugs at his arm.
<b> MRS. FOX
</b> Come on! Stop it! Let's go!
<b>
</b>
<b>
</b>
<b>
</b>
<b>
</b>
<b> 4.
</b> Fox pulls on a little, hanging wire. A chain unrolls rapidly
from a pulley, and a steel cage falls slap down on top of
them. A small tag on the base of it says Badoit et Fils. Fox
and Mrs. Fox stand motionless, side by side, in disbelief.
<b> FOX
</b> No, it just falls straight down right
here, doesn't it? I guess it's not spring-
loaded.
Sounds come from around the farm: the dog barks, doors open,
voices yell, lights come on. Mrs. Fox turns to Fox and says
<b> QUIETLY:
</b>
<b> MRS. FOX
</b> I'm pregnant.
Fox stares at Mrs. Fox. He is confused but moved.
<b> FOX
</b> Wow. We're going to have a cub. Honey,
that's great news!
<b> MRS. FOX
</b> If we're still alive tomorrow morning, I
want you to find another line of work.
Pause. Fox nods.
<b> CUT TO:
</b> A wide shot of the entire valley. There are thick woods,
green and yellow fields, two ponds, a small village, and a
river running through the middle.
<b> TITLE:
</b> 2 YEARS LATER ( 12 Fox-Years)
<b> EXT. HOLE. DAY
</b>
The entrance to a tunnel under a dirt mound covered with
holly bushes.
<b> INT. HOLE. DAY
</b>
A small, comfortable kitchen off a living room with two
bedrooms behind it. Fox sits at the kitchen table reading a
newspaper called the Gazette. His fur has gone grey at the
temples, and he now wears a dark, double-breasted, pin-
striped suit with a conservative necktie. Mrs. Fox stands at
the counter-top stirring something in a bowl with a whisk.
<b>
</b>
<b>
</b>
<b>
</b>
<b>
</b>
<b> 5.
</b> She is dressed in a paint-splattered, cream-colored,
Victorian-style dress.
<b> INSERT:
</b> A column in the newspaper with Fox's picture at the top of
it. The caption reads: Fox about Town with Fantastic Mr. Fox.
<b> FOX
</b> Does anybody actually read my column? Do
your friends ever talk about it?
<b> MRS. FOX
</b>
<b> (STILL STIRRING)
</b> Of course. In fact, Rabbit's ex-
girlfriend just said to me last week, "I
should read Foxy's column," but they
don't get the Gazette.
(yelling into the next room)
Ash! Let's get cracking!
<b> FOX
</b> Why would they? It's a rag-sheet.
<b> (SIGHS)
</b> I want to say I hate my job, but that
would make it seem more important to me
than I want people to think it is.
Mrs. Fox puts down her bowl and starts slicing a loaf of
bread. A small, narrow fox cub comes out of one of the
bedrooms wearing white pants and no shirt. His hair is
smashed all onto one side sticking up wrong. He is Ash.
<b> ASH
</b> I'm sick.
<b> MRS. FOX
</b> You're not sick.
<b> ASH
</b> I have a temperature.
Mrs. Fox goes quickly over to Ash and puts her paw to his
forehead.
<b> MRS. FOX
</b> You don't have a temperature.
Ash turns away and says as he goes back into his bedroom:
<b> ASH
</b> I don't want to go.
</pre>
Also see: Tab Triggers