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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

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


                <!DOCTYPE html>
<html lang="en">

  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Mac Miller Tribute</title>
  <link rel="stylesheet" type="text/css" href="main.css">
  <link href="|Open+Sans:400,700|Playfair+Display:400,700"

<!--Each ID only used to pass FCC project spec, not used in CSS-->

  <div class="container" id="main">
    <header class="header">
      <h1 class="header__title" id="title">Malcolm "Mac Miller" McCormick</h1>
      <h2 class="header__subtitle">Prolific rapper known for wordplay style and artistic reinvention</h2>
      <div class="header__img" id="img-div">
        <img id="image" src="" alt="Mac Miller Tribute Photo"
        <div class="header__img-caption" id="img-caption">
          Mac Miller recording in the studio before his passing.

    <main class="main" id="tribute-info">
      <article class="main__article">
        <h3 class="main__header">The Life of Mac Miller</h3>
        <p>Malcolm James McCormick (January 19, 1992 – September 7, 2018), known professionally as Mac Miller, was an
          American rapper, singer, and record producer. Born in Pittsburgh, Pennsylvania, Miller began his career in
          city's hip-hop scene in 2007, at the age of fifteen. He signed a record deal with Pittsburgh-based indie
          Rostrum Records in 2010. His breakthrough came with the mixtapes K.I.D.S. (2010) and Best Day Ever (2011),
          including the single "Donald Trump".</p>

        <div class="main__quote">
            <p>"The life you live is more important than the words you speak"</p>
            <span> - Mac Miller</span>

        <p>Miller's debut studio album, Blue Slide Park (2011), reached number-one on the US Billboard 200, the first
          independently distributed debut album to top the chart since 1995. In early 2013, Miller launched his own
          record label imprint, REMember Music. After his second studio album, Watching Movies with the Sound Off
          (2013), he left Rostrum and signed a record deal with the major label Warner Bros. Records in October 2014.
          With them, he released three studio albums: GO:OD AM (2015), The Divine Feminine (2016), and Swimming (2018).
          He also served as a record producer under the pseudonym Larry Fisherman, producing music for SZA, Vince
          Staples, Lil B, Ab-Soul, Riff Raff, Smoke DZA, and himself. He is posthumously nominated for Best Rap Album
          the 61st Annual Grammy Awards for Swimming.</p>
        <p>Miller struggled with substance abuse, which was often referenced in his lyrics.</p>

      <!-- I would use a div to wrap this section of content but this breaks the nested grid due to project specs.
          It appears you can only have one nested grid, and .main is a nested grid of .container.
          This means that the below items must all be elements directly below .main in order to be aligned individually inside the grid.-->
      <h3 class="main__header">Studio Albums</h3>
      <div class="main__albums main__album-one"><img src=""
          alt="Blue Slide Park Album Cover" width="100%">2011: Blue Slide Park</div>
      <div class="main__albums main__album-two"><img src=""
          alt="Watching Movies With The Sound Off Album Cover" width="100%">2013: Watching Movies with the Sound Off</div>
      <div class="main__albums main__album-three"><img src=""
          alt="GO:OD AM Album Cover" width="100%">2015: GO:OD AM</div>
      <div class="main__albums main__album-four"><img src=""
          alt="The Divine Feminine Album Cover" width="100%">2016: The Divine Feminine</div>
      <div class="main__albums main__album-five"><img src=""
          alt="Swimming Album Cover" width="100%">2018: Swimming</div>

    <footer class="footer">
      <!--ID used to pass FCC project spec, not used in CSS-->
      <div class="footer__reference-link">Read <a href="" target="_blank" id="tribute-link">more
          about Malcolm
          McCormick</a> on his Wikipedia page.</div>



                /* BEM naming conventions are used for this project. */
/* Reset Styles */
* {
  /* Easier calculations for padding, margin, borders */
  box-sizing: border-box;
  /* Ensures font defaults to user-selection for accessibility */
  font-size: 100%;

/* Page Styles */
body {
  font-family: var(--content-font);

/* Global Site Variables */
:root {
  --primary-bg-color: hsl(214, 83%, 89%);
  --content-bg-color: hsl(0, 0%, 100%);

  --title-font: 'Playfair Display', sans-serif;
  --content-font: 'Open Sans', sans-serif;
  --img-caption-font: 'Open Sans Condensed', sans-serif;


/* Blocks */
.container {
  display: grid;
  grid-template: 1fr auto auto / 100%;
  max-width: 1000px;
  margin: 0 auto;
  background: var(--content-bg-color);

.header {
  grid-row: 1 / 2;
  margin: 0 auto;
  padding: 10px;
  width: 100%;
  text-align: center;
  background: var(--primary-bg-color);
  font-family: var(--title-font);

.main {
  grid-row: 2 / 3;
  display: grid;
  grid-template: auto auto 1fr 1fr auto/ repeat(3, 1fr);
  column-gap: 2%;
  max-width: 90%;
  margin: 0 auto;
  padding: 0 20px;

.footer {
  grid-row: 3 / 4;
  margin: 10px auto 0;
  width: 100%;
  padding: 20px;
  background: var(--primary-bg-color);

/* Header Elements */
.header__title {
  font-weight: 700;
  font-size: 3em;
  margin: 0;

.header__subtitle {
  font-weight: 400;
  font-size: 1.5em;
  margin: 0;

.header__img {
  margin: 10px auto;
  max-width: 400px;
  height: auto;

/* Included to pass FCC project spec */
img {
  max-width: 400px;
  height: auto;
  display: block;

.header__img-caption {
  font-family: var(--img-caption-font);
  font-weight: 400;
  font-size: 1.3em;

/* Main Elements */
.main__article {
  line-height: 1.8;
  grid-area: 1 / 1 / 2 / span 3;

.main__header {
  font-family: var(--title-font);
  font-weight: 700;
  font-size: 1.5em;
  margin: 20px 0;
  grid-column: 1 / span 3;

.main__quote {
  font-weight: 700;
  font-style: italic;
  text-align: center;
  grid-area: 5 / 1 / 6 / span 3;
  width: 70%;
  margin: 0 auto;
  border: 1px solid black;

.main__albums {
  text-align: center;
  font-family: var(--img-caption-font);
  font-size: 1.2em;
  line-height: 1.5em;
  margin-bottom: 15px;

.main__albums img {
  border: 1px solid black;

.main__album-one {
  grid-area: 3 / 1 / 4 / span 1;

.main__album-two {
  grid-area: 3 / 2 / 4 / span 1;

.main__album-three {
  grid-area: 3 / 3 / 4 / span 1;

.main__album-four {
  grid-area: 4 / 1 / 5 / span 1;

.main__album-five {
  grid-area: 4 / 2 / 5 / span 1;

/* Footer Elements */
.footer__reference-link {
  text-align: center;


                // coded by @ChaituVR
const projectName = 'tribute-page';
localStorage.setItem('example_project', 'Tribute Page');