Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

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.

+ add another resource

JavaScript

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

Packages

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.

Behavior

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.

HTML

              
                <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>

<!-- 

User Story #1: My tribute page should have an element with a corresponding id="main", which contains all other elements. x

User Story #2: I should see an element with a corresponding id="title", which contains a string (i.e. text) that describes the subject of the tribute page (e.g. "Dr. Norman Borlaug"). x

User Story #3: I should see a div element with a corresponding id="img-div". x

User Story #4: Within the img-div element, I should see an img element with a corresponding id="image". x

User Story #5: Within the img-div element, I should see an element with a corresponding id="img-caption" that contains textual content describing the image shown in img-div. x

User Story #6: I should see an element with a corresponding id="tribute-info", which contains textual content describing the subject of the tribute page. x

User Story #7: I should see an a element with a corresponding id="tribute-link", which links to an outside site that contains additional information about the subject of the tribute page. HINT: You must give your element an attribute of target and set it to _blank in order for your link to open in a new tab (i.e. target="_blank"). x

User Story #8: The img element should responsively resize, relative to the width of its parent element, without exceeding its original size. x

User Story #9: The img element should be centered within its parent element. x

-->

<main id="main">
  <header>
    <h1 id="title">Victoria Wood</h1>
  </header>
      <figure id="img-div">
        <img id="image" src="https://upload.wikimedia.org/wikipedia/commons/thumb/1/1d/Victoria_Wood.jpg/440px-Victoria_Wood.jpg" alt="Victoria Wood, a middle aged white woman with a kind and thoughtful face." />
        <figcaption id="img-caption">
          Victoria Wood, comedian and writer.
        </figcaption>
      </figure>
  <section id="tribute-info">
    <p>Victoria Wood CBE (19 May 1953 – 20 April 2016) was an English comedian, actress, lyricist, singer, composer, pianist, screenwriter, producer and director.</p>

    <p>Wood wrote and starred in dozens of sketches, plays, musicals, films and sitcoms over several decades and her live comedy act was interspersed with her own compositions which she performed at the piano. Much of her humour was grounded in everyday life and included references to activities, attitudes and products that are considered to exemplify Britain. She was noted for her skills in observational comedy and in satirising aspects of social class.</p>
    <p><cite>~ <a href="https://en.wikipedia.org/wiki/Victoria_Wood" id="tribute-link" target="_blank">Victoria Wood on Wikpedia</a>.</cite></p>
  </section>
</main>
              
            
!

CSS

              
                body,
a {
  font: 22px "Volkorn", serif;
  color: pink;
  background: hsl(244, 38%, 16%);
  background-image: linear-gradient(
    45deg,
    hsl(244, 38%, 6%),
    hsl(244, 38%, 26%)
  );
}
a:hover,
a:active,
a:focus {
  filter: brightness(120%);
}

main {
  display: flex;
  flex-flow: row wrap;
  max-width: 55em;
  margin: auto;
  background-image: linear-gradient(
    -45deg,
    hsla(244, 38%, 6%, 25%),
    hsl(244, 38%, 26%, 25%)
  );
  padding: 1em;
  box-shadow: 50px 0px 60px hsla(244, 38%, 6%, 95%);
}
header {
  width: 100%;
  font: clamp(26px, 2vw, 44px) "Lexend Deca", sans-serif;
  padding: 1em 0 0;
  text-align: center;
  text-decoration: overline;
}

section {
  width: 50%;
  padding: 0 1em;
}
img {
  mix-blend-mode: multiply;
  object-fit: cover;
  width: 100%;
  height: auto;
  max-width: 100%;
}
figure {
  display: grid;
  place-items: center;
  background: hsl(244, 38%, 76%);
  border: 0.5px solid hsl(244, 38%, 16%);
  box-shadow: 8px 12px 0 hsl(244, 38%, 6%);
  border-radius: 2px;
  transform: rotate(-4deg);
}
figcaption {
  color: hsl(244, 38%, 16%);
  text-align: center;
  padding: 1em;
}

@media (max-width: 960px) {
  main {
    flex-flow: column;
  }
  section {
    width: 100%;
  }
  figure {
    transform: rotate(0deg);
  }
  aside {
    order: 3;
  }
}

              
            
!

JS

              
                // !! IMPORTANT README:

// You may add additional external JS and CSS as needed to complete the project, however the current external resource MUST remain in place for the tests to work. BABEL must also be left in place. 

/***********
INSTRUCTIONS:
  - Select the project you would 
    like to complete from the dropdown 
    menu.
  - Click the "RUN TESTS" button to
    run the tests against the blank 
    pen.
  - Click the "TESTS" button to see 
    the individual test cases. 
    (should all be failing at first)
  - Start coding! As you fulfill each
    test case, you will see them go   
    from red to green.
  - As you start to build out your 
    project, when tests are failing, 
    you should get helpful errors 
    along the way!
    ************/

// PLEASE NOTE: Adding global style rules using the * selector, or by adding rules to body {..} or html {..}, or to all elements within body or html, i.e. h1 {..}, has the potential to pollute the test suite's CSS. Try adding: * { color: red }, for a quick example!

// Once you have read the above messages, you can delete all comments. 

              
            
!
999px

Console