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

              
                
<!Docktype html>
<html>
	<head 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" />
    <link rel="stylesheet" type="text/css" href="style.css" />
    <title>Tribute Page</title>
	</head>
	<body>
		<main id="main">
			<h1 id="title">Tim Bergling (Avicci)</h1>
			<h5 class="sub-title">The man who still lives on through his music.</h5>
			<div id="img-div"><img id="image"src="https://weraveyou.com/wp-content/uploads/2018/05/Tiesto-X-Avicii-768x432.png" alt="Avicci">
				<p id="img-caption">The late Tim Bergling (left) with Dutch megastar Tiësto.</p>
			</div>
			
			<div id="tribute-info">
				<h3>Here's a timeline of Bergling's life.</h3>
				<div>
					<ul>
						<li>1989 - Born in Stockholm, Sweden.</li>
						<li>1997 - He started mixing music in his bedroom.</li>
						<li>2005 - After inspiration from his older brother who was a DJ, he started making music/mixes and posting them on electronic music forums.</li>
						<li>2011 - He rose to prominence with his single "Levels".</li>
						<li>2012 - He got nominated for a Grammy award for his work on "Sunshine" with David Guetta.</li>
						<li>2013 - He released his debut album 'True' which blended electronic music with elements of multiple genres and received generally positive reviews. It peaked in the top ten in more than fifteen countries and topped international dance charts.</li>
						<li>2015 - After the success of his first album, Avicci released his second studio album, 'Stories'.</li>
						<li>Avicci retired from touring in 2016 due to health problems, having suffered from stress and poor mental health for several years.</li>
						<li>2017 - He released an EP of his second album.</li>
						<li>2018 - On 20 April 2018, he committed suicide in Muscat. He was buried on 8 June at Hedvig Eleonora Church in his hometown.</li>
						<li>2019 - His posthumous third album titled Tim was released.</li>
					</ul>
				</div>
				<iframe width="560" height="315" src="https://www.youtube.com/embed/h2Tzd7MiOj8?start=19" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
			<footer>
				<h3>If you have time, you should read more about this incredible man on his <a id="tribute-link" href="https://en.wikipedia.org/wiki/Avicii" target="_blank">Wikipedia entry</a>.</h3>
				</footer>
			</div>
		</main>
	</body>
	
</html>


              
            
!

CSS

              
                #main {
	background-color:#ccd9ea;
  margin: 0;
	border-radius: 5px;
}
@media (max-width: 460px) {
  #main {
    margin: 0;
  }
}
#title {
  padding-top: 50px;
}
#title, .sub-title {
	text-align: center;
	font-family: 'Open Sans', sans-serif;
  
}
#img-div {
	background: white;
  padding: 10px;
  margin: auto;
  width: 90%;
	text-align: center;
  border-radius: 10px;
}
#image {
  display: block;
  margin-right: auto;
  margin-left: auto;
  max-width: 80%;
}
#img-caption {
	font-family: 'Open Sans', sans-serif;
  margin: 15px 0 10px 0;
}
@media (max-width: 460px) {
  #img-caption {
    font-size: 1.5rem;
  }
}

#tribute-info {
  font-family: 'Open Sans', sans-serif;
  font-size: 16px;
	text-align: center;
	padding-top: 10px;
}
#tribute-info ul {
	max-width: 600px;
  margin: 0 auto 50px auto;
  text-align: left;
  line-height: 1.6;
}
iframe {
  border-radius: 5px;
}
#tribute-link {
  color:blue;
}
footer {
	padding-bottom: 30px;
}
@media (max-width: 460px) {
  footer {
    padding-bottom: 15px;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console