Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

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.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

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.

+ add another resource


Add Packages

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.


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.



	<link rel="stylesheet" href="index.css">
	<link href="" rel="stylesheet">

	<form id="myForm">
		<h3>Join our spooky newsletter</h3>
		<input type="email" placeholder="" id="email-input">
		<span>💀 if you dare 💀</span>

	<div id="submitted">
		<p>There's thrilling content coming your way</p>
		<iframe class="giphy-embed" src="" ; frameBorder="0"></iframe>

	<audio id="torture">
		<source src="" type="audio/mpeg">
		Your browser does not support the audio effect

	<script src="index.js"></script>



                /* Submitted by Colin Myers :) */

body {
	margin: 0;
	background: #000;
	font-size: 20px;
	font-family: "Metal Mania", cursive;
	letter-spacing: 2px;
	color: #fff;

form {
	padding-top: 30vh;
	display: flex;
	flex-direction: column;
	align-items: center;

h3 {
	color: #ff7518;
	margin-bottom: 0.5em;

span {
	font-size: 12px;
	margin-top: 0.5em;

input {
	width: 15rem;
	height: 1.5em;
	border: none;
	padding: 2px 5px 2px 5px;
	font-family: "Metal Mania", cursive;
	font-size: inherit;

input:focus {
	outline: none;

button {
	display: block;
	background-color: #ff7518;
	font-size: 15px;
	cursor: pointer;
	border: none;
	padding: 0.5em 2em;
	margin-top: 1em;
	font-family: "Metal Mania", cursive;
	letter-spacing: 3px;

button:focus {
	background-image: linear-gradient(to right, #ff7518 0%, #000 100%);
	color: #fff;
	outline: 1px solid #ff7518;

button:active {
	animation: shake 0.5s;
	animation-iteration-count: infinite;

@keyframes shake {
	0% {
		transform: translate(1px, 1px) rotate(0deg);
	10% {
		transform: translate(-1px, -2px) rotate(-1deg);
	20% {
		transform: translate(-3px, 0px) rotate(1deg);
	30% {
		transform: translate(3px, 2px) rotate(0deg);
	40% {
		transform: translate(1px, -1px) rotate(1deg);
	50% {
		transform: translate(-1px, 2px) rotate(-1deg);
	60% {
		transform: translate(-3px, 1px) rotate(0deg);
	70% {
		transform: translate(3px, 1px) rotate(-1deg);
	80% {
		transform: translate(-1px, -1px) rotate(1deg);
	90% {
		transform: translate(1px, 2px) rotate(0deg);
	100% {
		transform: translate(1px, -2px) rotate(-1deg);

#submitted {
	padding-top: 2em;
	text-align: center;
	display: none;



                const emailRegex = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
const email = document.getElementById("email-input");
const form = document.getElementById("myForm");
const submittedMessage = document.getElementById("submitted");
const audio = document.getElementById("torture");
const error = document.getElementById("error");

form.addEventListener("submit", function (e) {
	if (!emailRegex.test(email.value)) {
		document.getElementById("error").style.display = "block";
	} else { = "none";; = "block";
		console.log("email: ", email.value);