123

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.

            
              <!---------- 
INSTRUCTIONS
------------

1) Fork this Pen to your own CodePen account (click the 'Fork' button located in the upper right of this Pen).

2) The markup below has been styled using both inline and internal CSS. As we've learned, this isn't best practice, so let's refactor our CSS styles! Refactoring simply means re-structuring parts of our code without changing its functionality or output. Keep the following things in mind as you begin to refactor your CSS styles:
 - Internal CSS = styles written between <style></style> tags.
 - Inline CSS = styles applied directly to an element via the style="" attribute.
 - Pay close attention to any class or id attributes used in the markup. These should remain in place as you refactor, and should be used in your external CSS to reduce repetition in your stylesheet.
 - You should not be adding any attributes to the markup (class, id, etc.).

*NOTE: For this exercise, you don't need to include a <link> element in the <head> section of your HTML to reference your external CSS stylesheet. In CodePen, any styles that we write in the CSS panel to the right will be applied to our markup automatically - thanks again CodePen 🙌

3) When you're done refactoring your inline CSS to an external stylesheet, the output in the preview panel should look the same as when you started.

RESOURCES
------------
 - https://www.hostinger.com/tutorials/difference-between-inline-external-and-internal-css
 - https://developer.mozilla.org/en-US/docs/Learn/CSS/Introduction_to_CSS/Syntax
 - https://css-tricks.com/how-css-selectors-work/
------------>

<style>
  body {
    width: 50%;
    margin: 2rem auto;
    font-family: 'Open Sans', sans-serif;
  }

  p {
    font-size: 1rem;
  }
  
  h1, h2 {
    margin-bottom: 5px;
  }
</style>

<h1 class="heading" style="font-size: 3rem; font-family: 'Noto Serif', serif;">Please Do Learn to Code</h1>
<p id="source" style="font-style: italic;">Excerpted from <a href="http://blog.codinghorror.com/please-dont-learn-to-code/" style="font-weight: bold; color: #2a8764;">Medium Post</a> by Quincy Larson</p>

<p>This morning I woke up to dozens of messages from students who had read an article titled “Please Don’t Learn to Code.”</p>

<p>At first, I assumed <a href="http://blog.codinghorror.com/please-dont-learn-to-code/" style="font-weight: bold; color: #2a8764;">Jeff Atwood’s 2012 article</a> had spontaneously reappeared on Reddit. But no — this was a brand new Tech Crunch article of the same name, which echoed Atwood’s assertion that encouraging everyone to learn programming is like encouraging everyone to learn plumbing.</p>

<p>Here’s why programming — unlike plumbing — is an important skill that everyone should learn:</p> 
<p class="special" style="color: #b03060; font-weight: bold; font-size: 1.25rem">Programming is How Humans Talk to Machines</p>

<h2 class="heading" style="font-size: 2rem; font-family: 'Noto Serif', serif;">Coding isn’t some niche skill. It really is “the new literacy.”</h2>

<p>It’s the essential 21st century skill that every ambitious person needs to learn if they want to succeed.</p>

<p>Don’t believe me? Just look at the legal profession. Software is turning it inside out, and causing mass unemployment for the lawyers who can’t code.</p>

<p>The same is increasingly true for managers, marketers, accountants, doctors, and pretty much every white-collar job in between.</p>

<p class="special" style="color: #b03060; font-weight: bold; font-size: 1.25rem">Learn to code. Learn to talk to machines. And flourish.</p>
            
          
!
            
              /* Write your external CSS styles here */

            
          
!
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.

Console