css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <link href="https://fonts.googleapis.com/css?family=Josefin+Sans|Roboto+Condensed" rel="stylesheet">

<header>
    <h1>Hello, world!</h1>
</header>
<main>
    <h2>This is a demo site! For my blog post related to this site, <a href="https://codifiedconcepts.com/want-to-start-coding-ideas-to-get-you-going" target="_BLANK">click here!</a></h2>

    <p>I'm writing hypertext markup language to create visual web content.</p>
    <p>This site uses HTML (to create the site content), CSS (to add styles), and jQuery (which is a JavaScript library used to add functions, like replacing colors at the click of a button). I’ve also added a CSS animation when you hover over the buttons.</p>
    <p>This site can be upgraded to take advantage of modern advanced CSS techniques (like using flexbox), adjusted to be more mobile friendly, and evaluated for accessibility as your skills advance.</p>
    <p>Once you are comfortable with static HTML & CSS sites, you may want to try your hand at creating dynamic sites, such as sites created with free WordPress.org software!</p>

    <section>
        <p>And who could resist a little <strong>Potter Ipsum</strong> &#x1F604;...</p>

        <div class="columns" id="column-one">
            <p>Peruvian-Night-Powder werewolf, Dobby pear-tickle half-moon-glasses, Knight-Bus. Padfoot snargaluff seeker: Hagrid broomstick mischief managed. Snitch Fluffy rock-cake, 9 ¾ dress robes I must not tell lies.</p>

            <ul>
                <li>Alohamora wand elf parchment.</li>
                <li>Wingardium Leviosa hippogriff, house dementors betrayal.</li>
                <li>Holly, Snape centaur portkey ghost Hermione spell bezoar Scabbers.</li>
            </ul>

            <button>Evanesco (Vanishing Spell)</button>
        </div>

        <div class="columns" id="column-two">
            <p>Hedwig Daily Prophet treacle tart full-moon Ollivanders You-Know-Who cursed. Fawkes maze raw-steak Voldemort Goblin Wars snitch Forbidden forest grindylows wool socks.</p>

            <ol>
                <li>Mudbloods yew pumpkin juice phials.</li>
                <li>Ravenclaw’s Diadem 10 galleons Thieves Downfall.</li>
                <li>Ministry-of-Magic mimubulus mimbletonia Pigwidgeon knut phoenix feather other minister Azkaban.</li>
            </ol>

            <button>Riddikulus</button>
        </div>
    </section>

    <button id="return-text">Aparecium (Revealing Charm)</button>
</main>

<footer>
    <p>Brought to you by <a href="https://codifiedconcepts.com" target="_BLANK">Maren Vernon of Codified Concepts, LLC.</a></p>
</footer>
            
          
!
            
              h1 {
    text-align: center;
    color: white;
    font-size: 42px;
}
a {
    color: #404040;
    font-weight: bold;
    font-style: italic;
}
header {
    background: #5459A7;
    padding: 12px 0;
    font-family: 'Josefin Sans', sans-serif;
    text-transform: uppercase;
}
main {
    width: 90%;
    margin: 40px auto;
    color: #404040;
    font-size: 16px;
    font-family: 'Roboto Condensed', Arial, sans-serif;
}
section {
    overflow: auto;
    background-image: url('https://images.pexels.com/photos/370799/pexels-photo-370799.jpeg');
    margin-top: 40px;
    padding: 20px 10px 50px;
}
section p {
    color: white;
}
.columns {
    max-width: 42%;
    min-height: 275px;
    margin: 2% 1%;
    padding: 1%;
    background: lightblue;
    border: 5px  #23D5AB solid;
}
.columns p {
    color: #404040;
}
#column-one {
    float: left;
}
#column-two {
    float: right;
}
button {
    display: block;
    margin: 30px auto 10px;
    padding: 6px 16px;
    background:  #23D5AB;
    border: 5px  #5459A7 dotted;
    font-family: 'Josefin Sans', sans-serif;
}
footer {
    clear: both;
    background: linear-gradient(-45deg, #5459A7, #0FA8BD, #3F76BB);
    padding: 12px;
    font-family: 'Josefin Sans', sans-serif;
    font-size: 14px;
    text-align: center;
    color: white;
}
footer a {
    color: white;
}

/*----- Button Animation -----*/
@keyframes bounceIn {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
    100% {
        transform: scale(1);
    }
}

button:hover,
button:active,
button:focus-within {
    animation: bounceIn 1s;
}
            
          
!
            
              //I'm using jQuery here.

$('#column-one button').on('click', function() {
	$('h2').css('opacity', 0);
	$('p').css('opacity', 0);
	$('li').css('opacity', 0);
});

$('#column-two button').on('click', function() {
	var myHeading = document.querySelector('h1');
	myHeading.textContent = 'Hufflepuff';
  
	$('section').css('background-image', 'url("https://images.pexels.com/photos/1328891/pexels-photo-1328891.jpeg")');
	$('header').css('background', '#C74319');
	$('.columns').css('background', 'white');
	$('.columns').css('border', '5px #C74319 dashed');
	$('button').css('background', 'peachpuff');
	$('button').css('border', '5px #C74319 solid');
	$('footer').css('background', 'linear-gradient(-45deg, #4E275E, #C74319, #8C275C)');
});

$('button#return-text').on('click', function() {
	alert('Ouch! Stop poking me! 😄');
	$('h2').css('opacity', 1);
	$('p').css('opacity', 1);
	$('li').css('opacity', 1);
});
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console