Pen Settings

HTML

CSS

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

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

              
                
<div id="flag-box">
    <img id="flag" src="https://upload.wikimedia.org/wikipedia/commons/thumb/c/ca/Flag_of_Iran.svg/630px-Flag_of_Iran.svg.png" alt="Iran flag">
  </div>

  <main>
    <head><title>Tribute Page</title></head>
    <div id="top-title">
      <h1 id="title">Gen.Qasem Soleimani</h1>
      <p><strong>a <em>Hero</em> who fought the EVIL for GOOD</strong></p>
    </div>
      <div id="img-div">
      <img id="image" src="https://fararu.com/files/fa/news/1398/10/17/603782_909.jpg" alt="qasem soleimani iran-iraq war">
      <p id="img-caption">Qasem Soleimani during Iran-iraq war</p>
      </div> 
    <div id="tribute-info">
      <ul>
        <li><b>1957</b> - Born in Kerman,IRAN.</li>
        <li><b>1979</b> - Joined Revolutionary Guard.</li>
        <li><b>1980</b> - fought for Iran in respond to iraqi attempt to capture Iran. </li>
        <li><b>1997</b> - was promoted to Quds force's Commander</li>
        <li><b>2014</b> - went to iraq to have a major role in crushing IsIs. </li>
        <li><b>2020</b> - was assassinated by US in iraq during an air strike.</li>
      </ul>
    </div>
    <p id="foot-caption">""He fought for freedom agianst cruel nations and terrorists and put his life serving his family, people and country.
      <br>despite the bad picture western countries showing from him, he was a true hero a real man Qasem Soleimani.<br> if you like you can read more about him <b><a id="tribute-link" href="https://en.wikipedia.org/wiki/Qasem_Soleimani" target="_blank">On Wikipedia</a></b>""</p>
    
  </main>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600&family=Red+Hat+Display:ital@1&display=swap');

#flag-box{
  display: flex;
  justify-content: flex-end;
  background-color: transparent;
}
#flag{
  width: 80px;
  height: 45px;
  z-index: 1;
}  
body{
   display: flex;
  flex-direction: column;
  justify-content: center;
  background: url(https://cdn-media-1.freecodecamp.org/imgr/MJAkxbh.png);
  font-size: 1.1rem;
  font-family: "Cinzel", sans-serif;
  text-align: center;
  margin: 0;
}
main{
  margin-left: 10px;
  margin-right: 10px;
  margin-bottom: 5px;
}
h1,p{
  margin: 0px;
  padding: 5px;
}

#top-title{
  margin-top: -2.5rem;
  border-radius: 1%;
  background-image: linear-gradient(115deg
  ,white,silver);
}

#img-div{
  margin-top: 3px;
}

#image{
  width: 65%;
  height: auto;
  border: rgba(255, 255, 255, 0.63) solid 5px;
}
#img-caption{
  padding: 2px;
  border-radius: 1%;
  background-image: linear-gradient(115deg
  ,white,silver);
}

#tribute-info{
  display: flex;
  justify-content: center;
  text-align: center;
  margin-top: .5rem;
  margin-bottom: .5rem;
  border: silver solid 3px;
}

#foot-caption{
  font-size:.9rem;
  color: rgba(0, 0, 0, 1);
  border-radius: 1%;
  background-color: rgba(0, 0, 0, .2);
  margin-bottom : 0px;
}

@media(max-width: 1000px){
  body{
    font-size: 1.4em;
  }
  
  #top-title{
    margin-top: 5px;
  }
  
  #foot-caption{
    font-size: .8em;
  }

  #flag{
    width: 65px;
    height: 40px;
  }
}

@media(max-width: 720px){
  body{
    font-size: 1.3em;
  }
  #top-title{
    margin-top: 5px;
  }
  #foot-caption{
    font-size: .8em;
  }
  #flag{
    width: 65px;
    height: 40px;
  }
}

@media(max-width: 480px){
  body{
    font-size: 1.2em;

  }
  #top-title{
    margin-top: 3px;
  }
  #foot-caption{
    font-size: .8em;
  }
  #flag{
    width: 40px;
    height: 20px;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console