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="main">
  <div id="header">
    <h1 id="title">
      Oscar Wilde
    </h1>
    <h2 id="subtitle">
      <cite>"I can resist everything except temptation."</cite>
    </h2>
    <div id="img-div">
      <img id="image" src="https://www.plusesmas.com/pictures/biografias/6000/6107.jpg" alt="Oscar Wilde">
      <p id="img-caption">Author - Poet - Playwright</p>
    </div>
  </div>
  <div id="tribute-info">
    <p>Oscar Fingal O'Flahertie Wills Wilde (16 October 1854 – 30 November 1900) was an Irish poet and playwright. After writing in different forms throughout the 1880s, he became one of the most popular playwrights in London in the early 1890s. He is best remembered for his epigrams and plays, his novel The Picture of Dorian Gray, and the circumstances of his criminal conviction for gross indecency for consensual homosexual acts in "one of the first celebrity trials", imprisonment, and early death from meningitis at age 46.</p>
    <p>Wilde's parents were Anglo-Irish intellectuals in Dublin. A young Wilde learned to speak fluent French and German. At university, Wilde read Greats; he demonstrated himself to be an exceptional classicist, first at Trinity College Dublin, then at Oxford. He became associated with the emerging philosophy of aestheticism, led by two of his tutors, Walter Pater and John Ruskin. After university, Wilde moved to London into fashionable cultural and social circles.</p>
    <figure>
      <img id="imgDorian" src="https://i.pinimg.com/originals/d5/c1/e5/d5c1e542cbcf05de786368fa2029428e.jpg" alt="The picture of Dorian Gray">
      <figcaption>The picture of Dorian Gray was one of the most recognized Wilde novels </figcaption>
    </figure>
    <div id="works">
      <h3>Selected Works</h3>
      <ul>
        <li>Ravenna <i>(1878)</i></li>
        <li>Poems <i>(1881)</i></li>
        <li>The Happy Prince and Other Stories <i>(1888)</i></li>
        <li>Lord Arthur Savile's Crime and Other Stories <i>(1891)</i></li>
        <li>A House of Pomegranates <i>(1891)</i></li>
        <li>Intentions <i>(1891)</i></li>
        <li>The Picture of Dorian Gray <i>(1890)</i></li>
        <li>The Soul of Man under Socialism <i>(1891)</i></li>
        <li>Lady Windermere's Fan <i>(1892)</i></li>
        <li>A Woman of No Importance <i>(1893)</i></li>
        <li>The Sphinx <i>(1894)</i></li>
        <li>An Ideal Husband <i>(1898)</i></li>
        <li>The Importance of Being Earnest <i>(1899)</i></li>
        <li>De Profundis <i>(1897)</i></li>
        <li>The Ballad of Reading Gaol <i>(1898)</i></li>
      </ul>
    </div>
  </div>
  <div id="footer">
    <p><a href="https://en.wikipedia.org/wiki/Oscar_Wilde" id="tribute-link" target="_blank">Click here</a> to learn more about Oscar Wilde</p>
  </div>
</div>
              
            
!

CSS

              
                * {
  margin: 0;
  padding: 0;
}
#main {
  font-family: "Roboto", sans-serif;
}
#header {
  text-align: center;
  background-color: #eee;
  padding: 30px;
}
#header h1,
#header h2 {
  margin: 20px;
}
#img-div img {
  display: block;
  border-radius: 10px;
  margin: 20px auto;
  width: 20%;
  min-width: 250px;
  max-width: 100%;
}
#tribute-info {
  margin: 0 auto;
  width: 80%;
  padding: 30px;
}
#tribute-info p {
  margin-bottom: 20px;
}
#tribute-info ul {
  list-style-type: none;
}
#tribute-info figure {
  text-align: center;
  margin-bottom: 30px;
}
#imgDorian {
  border-radius: 10px;
  margin: 20px;
  width: 20%;
  min-width: 200px;
  max-width: 100%;
}
#works {
  text-align: center;
}
#works h3 {
  margin-bottom: 20px;
}
#footer {
  background-color: #eee;
  text-align: center;
  padding: 20px;
}

              
            
!

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