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.
<h1 class=hide><a target="_blank" href="http://websemantics.uk/error/">404: Page not found</a></h1>
<p class=hide>If using a screen-reader you may wish to <a href="http://websemantics.uk/">return to homepage</a> before the loading noise of a Sinclair ZX Spectrum begins.</p>
<div id=box class=borderBox aria-hidden=true>
<div class=content>
<p class=copy>© 1982 Sinclair Research Ltd</p>
<p class=load1>LOAD <span class=cursor>L</span></p>
<p class=load2>LOAD "<span class=cursor>L</span></p>
<p class=load3>LOAD ""<span class=cursor>L</span></p>
<p class=prog>Program: 404 Page</p>
<p class=rtape>R Tape Loading Error (0:1)</p>
<!-- http://patorjk.com/software/taag/#p=moreopts&f=Doh&t=404%0APage%20not%20found -->
<div id=words class="flex words">
<div class=word>
<pre class=e1>$$\ $$\ $$$$$$\ $$\ $$\ </pre>
<pre class=e2>$$ | $$ |$$$ __$$\ $$ | $$ |</pre>
<pre class=e3>$$ | $$ |$$$$\ $$ |$$ | $$ |</pre>
<pre class=e4>$$$$$$$$ |$$\$$\$$ |$$$$$$$$ |</pre>
<pre class=e5>\_____$$ |$$ \$$$$ |\_____$$ |</pre>
<pre class=e6> $$ |$$ |\$$$ | $$ |</pre>
<pre class=e7> $$ |\$$$$$$ / $$ |</pre>
<pre class=e8> \__| \______/ \__|</pre>
</div>
<div class=word>
<pre class=e1>$$$$$$$\ </pre>
<pre class=e2>$$ __$$\ </pre>
<pre class=e3>$$ | $$ |$$$$$$\ $$$$$$\ $$$$$$\ </pre>
<pre class=e4>$$$$$$$ |\____$$\ $$ __$$\ $$ __$$\ </pre>
<pre class=e5>$$ ____/ $$$$$$$ |$$ / $$ |$$$$$$$$ |</pre>
<pre class=e6>$$ | $$ __$$ |$$ | $$ |$$ ____|</pre>
<pre class=e7>$$ | \$$$$$$$ |\$$$$$$$ |\$$$$$$$\ </pre>
<pre class=e8>\__| \_______| \____$$ | \_______|</pre>
<pre class=e9> $$\ $$ | </pre>
<pre class=e10> \$$$$$$ | </pre>
<pre class=e11> \_____/ </pre>
</div>
<div class=word>
<pre class=e1> $$\ </pre>
<pre class=e2> $$ | </pre>
<pre class=e3>$$$$$$$\ $$$$$$\ $$$$$$\ </pre>
<pre class=e4>$$ __$$\ $$ __$$\\_$$ _| </pre>
<pre class=e5>$$ | $$ |$$ / $$ | $$ | </pre>
<pre class=e6>$$ | $$ |$$ | $$ | $$ |$$\ </pre>
<pre class=e7>$$ | $$ |\$$$$$$ | \$$$$ |</pre>
<pre class=e8>\__| \__| \______/ \____/ </pre>
</div>
<div class=word>
<pre class=e1> $$$$$$\ $$\ </pre>
<pre class=e2>$$ __$$\ $$ |</pre>
<pre class=e3>$$ / \__|$$$$$$\ $$\ $$\ $$$$$$$\ $$$$$$$ |</pre>
<pre class=e4>$$$$\ $$ __$$\ $$ | $$ |$$ __$$\ $$ __$$ |</pre>
<pre class=e5>$$ _| $$ / $$ |$$ | $$ |$$ | $$ |$$ / $$ |</pre>
<pre class=e6>$$ | $$ | $$ |$$ | $$ |$$ | $$ |$$ | $$ |</pre>
<pre class=e7>$$ | \$$$$$$ |\$$$$$$ |$$ | $$ |\$$$$$$$ |</pre>
<pre class=e8>\__| \______/ \______/ \__| \__| \_______|</pre>
</div>
</div>
<div id=popup class=popup>
<div class=popup-content>
<form id=search-form2 class=search-form action="http://websemantics.uk/search/" method=get>
<fieldset class=search-fieldset>
<legend class=hide>Site search</legend>
<div class=flex>
<p class=popup-p>Return to <a href="http://websemantics.uk/">Homepage</a> or </p>
<label class="search-label hide" for=q>Search:</label>
<div class=search-container>
<input class=search-input id=q name=q type=search required placeholder="site search">
<button class=search-btn type=submit>
<svg width=36 height=36 viewbox="0 0 38 38">
<title>Search site</title>
<circle r=8 cy=16 cx=16 stroke=#b7b7b7 stroke-width=3 fill=transparent />
<line y2=30 x2=30 y1=23 x1=23 stroke=#b7b7b7 stroke-width=4 />
</svg>
<span>Search site</span>
</button>
</div>
</div>
</fieldset>
</form>
</div>
</div>
</div>
</div>
<svg class="tv tv-top" viewBox="0 0 1366 768" xmlns="http://www.w3.org/2000/svg"><path fill="#1a1a1a" d="M1366 731.6h-7c2.8-66-3-289.7-3-347.6 0-89.7-10-289-10-289 0-52.5-22.5-75-75-75 0 0-398.6-10-588-10C493.6 10 95 20 95 20c-52.5 0-75 22.5-75 75 0 0-10 199.3-10 289 0 58-6.8 281.5-4 347.6l-6 10V0h1366v731.6z"/></svg>
<svg class="tv tv-bottom" fill="#1a1a1a" viewBox="0 0 1366 768" xmlns="http://www.w3.org/2000/svg"><path d="M1366 44.5V768H0V44.5h7.2c-3 66 2.8 281 2.8 339.5 0 89.7 10 289 10 289 0 52.5 22.5 75 75 75 0 0 399.2 10 588 10 189.4 0 588-10 588-10 52.5 0 75-22.5 75-75 0 0 10-199.3 10-289 0-58.4 5.8-273.4 2.8-339.5h7.2z"/></svg>
html {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
*,
*:after,
*:before {
-moz-box-sizing: inherit;
-webkit-box-sizing: inherit;
box-sizing: inherit;
}
@font-face {
font-family: 'spectrum';
/* http://damieng.com/blog/2011/02/20/typography-in-8-bits-system-fonts */
/* http://fontstruct.com/fontstructions/show/118432 */
src: url(data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAA5UAA8AAAAAKUwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABWAAAABwAAAAccFZC+UdERUYAAAF0AAAAHAAAAB4AJwBqT1MvMgAAAZAAAABEAAAAYHHHDNRjbWFwAAAB1AAAAKwAAAFSzf7HXGN2dCAAAAKAAAAABAAAAAQARAURZ2FzcAAAAoQAAAAIAAAACP//AANnbHlmAAACjAAABs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2bXNrVkSiEfCVPOfuz2k6/mcdUDaXH+lSzBZnLzO0O8RYjKpv/jSIZnb2+tSOV1FqVmWJNYtSvTtej9RdpdACWeNptxUVOAwEAAMDZtrS4u7tbF4p7obi7Q0KQhBAuHHgAr+NTHHplLiMi69ez/zwRRIKoqJgccQm58uQrUKhIsRKlypSrUKlKtRq16tRr0KhJsxat2rTr0KlLtx69+vQbMGjIsBGjkkJjxqVMmDRl2oxZc+YtWLRk2Yq0VWsy1m3YtGXbjl179h04dOTYiVNnzl24dOXajVt37j149BPE4i/v35+vyWxh4uvjLUxl0n98tRuxAAFU2plOAAA=) format('woff');
font-weight: normal;
font-style: normal;
}
body {
width: 100vw;
height: 100vH;
overflow: hidden;
}
.borderBox {
position: absolute;
background-size: 10px 10px;
height: 100%;
padding: 7% 10%;
width: 100%;
overflow: hidden
}
.content {
position: relative;
height: 100%;
box-shadow: -2px 1px 4px #e7e7e7;
background: linear-gradient(to right, #dfdfdf, #dfdfdf 50%, #dedede 50%, #dedede);
background-size: 40px 100%;
-webkit-animation: content 5s 3 linear;
animation: content 5s 3 linear;
}
.bootup .content {
background-color: #000;
background: linear-gradient(to right, #151515, #000 50%, #0E0E0E 50%, #090909);
background-size: 20% 100%;
-webkit-animation: bootup .5s 1 linear;
animation: bootup .5s 1 linear;
}
p {
display: none;
position: absolute;
bottom: 0;
left: 0;
margin: .5rem 0
}
.prog {
bottom: auto;
left: 4px
}
pre {
display: block;
margin: 0
}
.text_copy .copy,
.text_load1 .load1,
.text_load2 .load2,
.text_load3 .load3,
.text_rtape .rtape,
.text_prog .prog {
display: block
}
.init_load {
background-color: cyan;
-webkit-animation: init_load 3s 1 linear;
animation: init_load 3s 1 linear;
}
.start_load {
background: -webkit-linear-gradient(top, cyan, cyan 50%, #c00 50%, #c00);
background: linear-gradient(to bottom, cyan, cyan 50%, #c00 50%, #c00);
background-size: 100% 40px;
-webkit-animation: start_load 1s 2 linear;
animation: start_load 1s 2 linear;
}
.start_blip {
background: -webkit-linear-gradient(top, cyan, cyan 10px, #c00 15px, #c00 25px);
background: linear-gradient(to bottom, cyan, cyan 10px, #c00 15px, #c00 25px);
background-size: 100% 26px;
-webkit-animation: start_blip .5s 2 ease;
animation: start_blip .5s 2 ease;
}
.loading {
background: -webkit-linear-gradient(top, yellow, yellow 5px, blue 9px, blue 14px, yellow 16px);
background: linear-gradient(to bottom, yellow, yellow 5px, blue 9px, blue 14px, yellow 16px);
background-size: 100% 12px;
-webkit-animation: start_blip 1s infinite ease;
animation: start_blip 1s infinite ease;
}
.cursor {
-webkit-animation: cursor 1s infinite linear;
animation: cursor 1s infinite linear;
}
@keyframes bootup {
00% {
background-position: 0 0
}
99% {
background-position: 2% 0
}
100% {
background-position: 0 0
}
}
@-webkit-keyframes bootup {
00% {
background-position: 0 0
}
99% {
background-position: 2% 0
}
100% {
background-position: 0 0
}
}
@keyframes content {
00% {
background-position: 0 0
}
99% {
background-position: 5% 0
}
100% {
background-position: 0 0
}
}
@-webkit-keyframes content {
00% {
background-position: 0 0
}
99% {
background-position: 5% 0
}
100% {
background-position: 0 0
}
}
@-webkit-keyframes cursor {
00% {
background: #000;
color: #fff
}
49% {
background: #000;
color: #fff
}
50% {
background: #ddd;
color: #000
}
100% {
background: #ddd;
color: #000
}
}
@keyframes cursor {
00% {
background: #000;
color: #fff
}
49% {
background: #000;
color: #fff
}
50% {
background: #ddd;
color: #000
}
100% {
background: #ddd;
color: #000
}
}
@-webkit-keyframes init_load {
00% {
background: #c00
}
39% {
background: #c00
}
40% {
background: cyan
}
79% {
background: cyan
}
80% {
background: #c00
}
89% {
background: #c00
}
90% {
background: cyan
}
100% {
background: cyan
}
}
@keyframes init_load {
00% {
background: #c00
}
39% {
background: #c00
}
40% {
background: cyan
}
79% {
background: cyan
}
80% {
background: #c00
}
89% {
background: #c00
}
90% {
background: cyan
}
100% {
background: cyan
}
}
@-webkit-keyframes start_load {
0% {
background-position: 0 0
}
100% {
background-position: 0 80px
}
}
@keyframes start_load {
0% {
background-position: 0 0
}
100% {
background-position: 0 80px
}
}
@-webkit-keyframes start_blip {
0% {
background-position: 0 0
}
100% {
background-position: 0 80px
}
}
@keyframes start_blip {
0% {
background-position: 0 0
}
100% {
background-position: 0 80px
}
}
.tv {
position: absolute;
width: calc(100% + 10px);
z-index: 2
}
.tv-top {
top:-5px;
left:-5px;
}
.tv-bottom {
bottom: -5px;
left:-5px;
}
.tv-left {
height: 100%
}
.tv-right {
right: 0;
height: 100%
}
/* Flex used for responsive layout */
.content {
display: flex;
justify-content: center;
align-content: space-around
}
.flex {
display: flex;
flex-wrap: wrap;
justify-content: space-around;
height: calc(100% - 24px);
padding: 32px 0px;
align-content: center;
XXXbox-shadow: 1px 0 2px rgba(0, 0, 0, .035)
}
/* 404 Line at a time animation */
pre {
visibility: hidden
}
.e1ON .e1,
.e2ON .e2,
.e3ON .e3,
.e4ON .e4,
.e5ON .e5,
.e6ON .e6,
.e7ON .e7,
.e8ON .e8,
.e9ON .e9,
.e10ON .e10,
.e11ON .e11,
.e12ON .e12 {
visibility: visible
}
.show404 pre {
visibility: visible
}
.hide {
position: absolute;
left: -500rem;
top: -500rem
}
.popup {
display: none;
position: absolute;
top: auto;
left: 0;
right: 0;
bottom: 0;
z-index: 3;
}
.popup.ON {
display: block;
}
.popup-content {
margin: 0 auto;
max-width: 38rem;
}
.popup-h {
position: absolute;
left: -200rem;
font-weight: normal;
}
.popup-p {
flex: 1 1 0;
position: relative;
display: inline-block;
}
.popup-p a,
.popup-p a:visited {
color: #236ECE
}
.popup-p a:hover,
.popup-p a:focus {
color: #014cac
}
.search-fieldset {
border: 0 solid;
padding: 0;
margin: 0;
}
.search-fieldset .flex {
padding: 0;
}
.search-input {
color: #3B2D4A;
flex: 1 1 0;
padding: .62rem 1rem;
width: 100%;
font-size: 1rem;
}
.search-btn {
padding: 0;
display: block;
border: 0 solid;
background-color: #3B2D4A;
cursor: pointer;
}
.search-btn svg {
width: 2.3rem;
height: 100%;
}
.search-btn svg path {
stroke: #ddd;
}
.search-btn:hover path,
.search-btn:focus path {
stroke: #fff;
}
.search-btn span {
position: absolute;
left: -200rem;
}
/* 320x480 */
.borderBox {
padding: 8vh 10%;
}
.content {
box-shadow: -2px 1px 4px #e7e7e7, 1px 0 2px rgba(0, 0, 0, .035)
}
.words {
padding: 0;
text-align: center;
height: calc(100% - 60px);
}
.popup-content {
max-width: 30rem;
text-align: center;
}
.search-container {
width: 100%;
padding: 0;
position: relative;
display: block;
border: 1px solid #3B2D4A;
}
.search-input {
background-color: transparent;
border: 0 solid;
}
.search-btn {
position: absolute;
top: 0;
right: 0;
height: 100%;
}
/* */
html {
font-size: 11px;
}
@media (min-width:340px) {
html {
font-size: 12px;
}
}
@media (min-width:400px) {
html {
font-size: 13px;
}
}
@media (min-width:650px) {
html {
font-size: 15px;
}
}
@media (min-width:800px) {
html {
font-size: 16px;
}
}
body {
margin: 0;
background: #ddd;
color: #333;
}
body,
.search-input {
font-family: spectrum, Courier, monospace;
font-weight: bold;
text-shadow: -4px 0 2px #fff;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-smoothing: antialiased;
}
pre {
font-size: calc(1vmin * 2.2)
}
.word {
margin: .5rem
}
.flex {
align-content: center;
}
@media (orientation: landscape) {
.flex {
align-content: flex-start;
}
}
try {
window.AudioContext = window.AudioContext || window.webkitAudioContext, window.audioContext = new window.AudioContext
} catch (a) {
console.log("No Web Audio API support")
}
var WebAudioAPISoundManager = function(a) {
this.context = a;
this.bufferList = {};
this.playingSounds = {}
};
WebAudioAPISoundManager.prototype = {
addSound: function(a) {
var b = new XMLHttpRequest;
b.open("GET", a, !0);
b.responseType = "arraybuffer";
var c = this;
b.onload = function() {
c.context.decodeAudioData(b.response, function(b) {
b ? c.bufferList[a] = b : alert("error decoding file data: " + a)
})
};
b.onerror = function() {
console.log("BufferLoader: XHR error")
};
b.send()
},
stopSoundWithUrl: function(a) {
if (this.playingSounds.hasOwnProperty(a))
for (var b in this.playingSounds[a]) this.playingSounds[a].hasOwnProperty(b) && this.playingSounds[a][b].stop()
}
};
var WebAudioAPISound = function(a) {
this.url = a + ".mp3";
window.webAudioAPISoundManager = window.webAudioAPISoundManager || new WebAudioAPISoundManager(window.audioContext);
this.manager = window.webAudioAPISoundManager;
this.manager.addSound(this.url)
};
WebAudioAPISound.prototype = {
play: function(a) {
var b = this.manager.bufferList[this.url];
this.settings = {
loop: !1,
volume: .5
};
for (var c in a) a.hasOwnProperty(c) && (this.settings[c] = a[c]);
"undefined" !== typeof b && (a = this.makeSource(b), a.loop = this.settings.loop, a.start(0), this.manager.playingSounds.hasOwnProperty(this.url) || (this.manager.playingSounds[this.url] = []), this.manager.playingSounds[this.url].push(a))
},
stop: function() {
this.manager.stopSoundWithUrl(this.url)
},
makeSource: function(a) {
var b = this.manager.context.createBufferSource(),
c = this.manager.context.createGain();
c.gain.value = this.settings.volume;
b.buffer = a;
b.connect(c);
c.connect(this.manager.context.destination);
return b
}
};
var typingSound = new WebAudioAPISound("https://websemantics.uk/audio/speccy.keypress");
var speccy1Sound = new WebAudioAPISound("https://websemantics.uk/audio/speccy1");
var speccy2Sound = new WebAudioAPISound("https://websemantics.uk/audio/speccy2");
var box = document.getElementById("box"),
delay = 1;
function boxClass(cls, delay, add) {
if (add) {
setTimeout(function() {
box.classList.add(cls);
}, delay);
} else {
setTimeout(function() {
box.classList.remove(cls);
}, delay);
}
}
function animateWords() {
var delay = 0,
i = 12;
while (i--) {
boxClass('e' + (12 - i) + 'ON', delay, true);
delay += 200;
}
}
boxClass('bootup', delay, true);
delay += 500;
boxClass('bootup', delay);
boxClass('text_copy', delay, true);
delay += 1500;
boxClass('text_copy', delay);
boxClass('text_load1', delay, true);
setTimeout(function() {
typingSound.play({
// keep it quiet
volume: 0.1
});
}, delay);
delay += 1250;
boxClass('text_load1', delay - 10);
boxClass('text_load2', delay, true);
setTimeout(function() {
typingSound.play({
volume: 0.1
});
}, delay);
delay += 750;
boxClass('text_load2', delay - 10);
boxClass('text_load3', delay, true);
setTimeout(function() {
typingSound.play({
volume: 0.1
});
}, delay);
delay += 750;
setTimeout(function() {
typingSound.play({
volume: 0.1
});
}, delay - 100);
boxClass('text_load3', delay - 10);
boxClass('init_load', delay, true);
delay += 2920;
setTimeout(function() {
speccy1Sound.play({
loop: false,
volume: 0.1
});
}, delay);
delay += 80;
boxClass('start_load', delay, true);
delay += 1000;
boxClass('start_load', delay - 10);
boxClass('start_blip', delay, true);
delay += 300;
boxClass('start_blip', delay - 10);
boxClass('text_prog', delay, true);
setTimeout(function() {
document.body.addEventListener('click', ETgoHome, false);
}, delay);
delay += 1200;
boxClass('start_load', delay, true);
delay += 150;
setTimeout(function() {
speccy2Sound.play({
loop: false,
volume: 0.1
});
}, delay);
delay += 350;
boxClass('init_load', delay - 20);
boxClass('start_load', delay - 10);
boxClass('loading', delay, true);
setTimeout(animateWords, delay);
boxClass('text_prog', delay);
delay += 2150;
boxClass('loading', delay - 20);
boxClass('text_rtape', delay, true);
Also see: Tab Triggers