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

Auto Save

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

              
                <head>
  <link href="https://fonts.googleapis.com/css?family=Righteous&display=swap" rel="stylesheet">
  <title>FCC: Tribute Page to Bruce Lee</title>
  <main id="main">
    <div class="heading-area">
      <h1 id="title"> BRUCE LEE 李小龍</h1>
      <h2 class="subheading"> "The Dragon"</h2>
    </div>
    <figure id="img-div"><img src="https://jkdkarlsruhe.files.wordpress.com/2019/01/bruce-lee.jpg" alt="Bruce Lee with fighting gloves" id="image"/><figcaption id="img-caption">BRUCE LEE WITH FIGHTING GLOVES</figcaption>
    </figure>
    <h3 id=tribute-info-title>ARTIST + PHILOSOPHER</h3>
    <p id="tribute-info">Bruce Lee was a famous martial artist, movie star and cultural icon but his philosophy has caught fire around the world with a new generation seeking meaning and consciousness. He continues to teach us how to cultivate our truest selves and be in harmony with the world.</p>
    <button id="button">
    <a id="tribute-link" href="https://brucelee.com/bruce-lee" target="_blank">More on Bruce Lee's story here</a>
    </button>
  </main>
</head>
              
            
!

CSS

              
                #main {
  font-family: arial;
  font-size: 10px;
  text-align: center;
  background: url("https://cdn-media-1.freecodecamp.org/imgr/MJAkxbh.png");
  display: grid;
  grid-template-columns: ;
  grid-template-areas: 
    "header"
    "thumbnail"
    "content-title"
    "content"
    "footer";
}
.heading-area {
  width: 300px;
  background-color: black;
  margin: auto;
  border-radius: 5%;
}
#title {
  font-size: 2rem;
  color: yellow;
  font-family: "Righteous", calibri;
  text-align: center;
}
.subheading {
  font-size: 1rem;
  color: yellow;
  font-family: "Righteous", calibri;
  justify-item: center;
  text-align: center;
}
#img-div {
  padding: 1rem;
  grid-area: thumbnail;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}
#image:hover {
  box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
}
#img-caption {
  font-family: "arial";
  margin: 15px 0 5px 0;
}
#tribute-info-title {
  font-size: 1.5rem;
  grid-area: content-title;
}
#tribute-info {
  font-size: 1rem;
  padding: 0% 30%;
  grid-area: content;
}
#button {
  border-color: yellow;
  border-width:5px;
  background-color: black;
  padding: 0.5em;
  margin: 0 43%;
}
#tribute-link {
  color: yellow;
}
              
            
!

JS

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

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").

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

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

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.

( maybe later if I want: https://banner2.cleanpng.com/20180802/zzx/kisspng-bruce-lee-s-fighting-method-statue-of-bruce-lee-fl-brucetea-superpower-tea-5b636a386199b7.8753831815332419123998.jpg)

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.

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").

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

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

You can build your project by forking this CodePen pen. Or you can use this CDN link to run the tests in any environment you like: https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js.

Once you're done, submit the URL to your working project with all its tests passing.
https://www.freecodecamp.org/learn/responsive-web-design/responsive-web-design-projects/build-a-tribute-page
*/
              
            
!
999px

Console