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

              
                <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
<body id="main">
    <header id="title">
        
        <h1>King D. Dinis of Portugal</h1>
        <h2>The Farmer King</h1>
    
    </header>
      
    <div id="img-div">
        <img id="image" alt="King D. Dinis of Portugal" src="https://i0.wp.com/www.vortexmag.net/wp-content/uploads/2016/01/dinis1a-e1510044511434.jpg?fit=1200%2C857&ssl=1">
        <figcaption id="img-caption">VxMag, by vortexmag.net</figcaption>
      </div>
    </div>
      
    <section id="tribute-info">
       
        <div id="descriprion">
        <p>Sixth king of Portugal, son of D. Afonso III and D. Beatriz of Castile, he was born on October 9, 1261 and died in 1325. He was acclaimed king in Lisbon, in 1279, having ruled for 46 years.<p>
        <p>In 1282 he married D. Isabel de Aragon (Queen Santa Isabel); the queen would also play an important role throughout this reign, not only for her charitable actions but, above all, for her performance alongside the king in foreign policy, and between him and his son during the fights between them.</p>
        <p>He was the first king not to have to worry about territorial expansion. He tried to fight against privileges that, in some way, went against his authority. In 1282 he established that all appeals from any judges could only be made to the king. He resorted to inquiries in 1284, and there were others throughout his reign. He sought an agreement with the Church, an agreement that would be established by concordat in 1290. He prohibited Orders and clerics from acquiring property from scratch, but also sought to defend the Church from abuses resulting from the patronage system. He supported the knights of the Order of Sant'Iago when they separated from their Castilian master, and he saved that of the Templars in Portugal, giving it new existence under the name of Order of Christ.</p>
        <p>It entered a war with Castile in 1295, which only ended with the Treaty of Alcanises, drawn up in the Castilian town of the same name on September 12, 1297. This treaty provided for a 40-year peace, friendship and mutual defense. Borders were also stabilized in neuralgic areas such as Beira and Alentejo, with the exception of small areas that would quickly become part of the kingdom.</p>
        <p>He developed the fairs, creating the so-called free fairs by granting different privileges and exemptions to various villages. It protected exports to the ports of Flanders, England and France; in 1308 he concluded a trade treaty with the King of England and definitively established the Portuguese navy.</p>
        <p> It was, however, agriculture that interested him the most (hence his nickname, "the Lavrador"). It sought to interest the entire population in the exploitation of land, facilitating its distribution. In Entre Douro e Minho he divided the lands into couples, each couple coming later to give rise to a village.</p>
        <p>In Trás-os-Montes the king adopted a collectivist regime; the lands were given to a group that shared the burdens among themselves, certain services and buildings were communal, such as the bread oven, the mill and the guard of the flock. In Estremadura, the dominant form of settlement was based on the jugada tax; other types of division were also used, such as partnership.</p>
        <p>A poet himself, D. Dinis also gave a great impulse to culture. It ordered the exclusive use of the Portuguese language in official documents. He founded in Lisbon, in 1290, a General Study (University) in which the Arts, Civil Law, Canon Law and Medicine were immediately taught. He had important works translated, and his Court was one of the largest literary centers on the Peninsula.</p>       
        </div> 
                  
    </section>
  
    <footer>
     
     <a id="tribute-link" href="https://en.wikipedia.org/wiki/Denis_of_Portugal" target="_blank"> Click here to know more about King D. Dinis of Portugal</a>
        
        
  </footer> 
    
  
    
</body>
</html>
              
            
!

CSS

              
                body {
    background-color: white;
    color: black;
    font-family: Arial, Helvetica;
    font-size: 16px;
    line-height: 1.5em;
    margin: 0;
       
}

header h1 {
    text-align: center;
    background-color: coral;
    margin:auto;
    height:1.5em;
    padding-top: 20px;    

}

header h2 {
    text-align: center;
    background-color: #333;
    color: white;
    height:1.5em;
    padding-top: 15px;
    margin: 0;
}

#img-div {
    background-color: #333;
}

#image {
    width: 500px;
    border-radius: 20px;
    object-fit: contain;
    margin: 0 auto;
    opacity: 0.9;
    display: block;
  }

  #img-caption {
      color: white;
      text-align: center;
      font-size: 10px;
  }

  #tribute-info {
      width: 80%;
      margin: auto;

  }

  footer {
      background-color: #333;
      color: white;
      height: 1cm;
      text-align: center;
           
      
  }

  a:link {
      color: white;

  }

  a:visited {
    color: white;
    
}

img {
    max-width: 100%;
    height: auto;
}
              
            
!

JS

              
                
              
            
!
999px

Console