HTML preprocessors can make writing HTML more powerful or convenient. For instance, Markdown is designed to be easier to write and read for text documents and you could write a loop in Pug.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. So you don't have access to higher-up elements like the <html>
tag. If you want to add classes there that can affect the whole document, this is the place to do it.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. If you need things in the <head>
of the document, put that code here.
The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https.
CSS preprocessors help make authoring CSS easier. All of them offer things like variables and mixins to provide convenient abstractions.
It's a common practice to apply CSS to a page that styles elements such that they are consistent across all browsers. We offer two of the most popular choices: normalize.css and a reset. Or, choose Neither and nothing will be applied.
To get the best cross-browser support, it is a common practice to apply vendor prefixes to CSS properties and values that require them to work. For instance -webkit-
or -moz-
.
We offer two popular choices: Autoprefixer (which processes your CSS server-side) and -prefix-free (which applies prefixes via a script, client-side).
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.
You can apply CSS to your Pen from any stylesheet on the web. Just put a URL to it here and we'll apply it, in the order you have them, before the CSS in the Pen itself.
You can also link to another Pen here (use the .css
URL Extension) and we'll pull the CSS from that Pen and include it. If it's using a matching preprocessor, use the appropriate URL Extension and we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
JavaScript preprocessors can help make authoring JavaScript easier and more convenient.
Babel includes JSX processing.
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.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
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.
Using packages here is powered by Skypack, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ES6 import
usage.
All packages are different, so refer to their docs for how they work.
If you're using React / ReactDOM, make sure to turn on Babel for the JSX processing.
If active, Pens will autosave every 30 seconds after being saved once.
If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.
If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.
Visit your global Editor Settings.
<html>
<head> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8">
<title>This is a tribute to Martin Luther King Jr.</title></head>
<body id="main">
<header>
<h1 id="title"><strong>Dr. Martin Luther King Jr.</h1>
<h2 id="title">January 15, 1929 - April 4, 1968</h2>
<figure id="img-div">
<img id="image" src="https://i.ibb.co/m4gK2RQ/Shutterstock-774596644.jpg" alt="shutterstock-774596644">
<figcaption id="img-caption">Minister and Civil Rights Leader</figcaption>
</figure>
</header>
<div id="tribute-info">
<p> Dr. Martin Luther King Jr. graduated from Booker T. Washington High School entering Morehouse College at the young age of 15. This soon to be Leader of the Civil Rights movement continued his education at Morehouse with a major in Sociology and graduated from Morehouse in 1948 with a Bachelor Degree of Arts. This great man continued his education from 1948 - 1951 at Cozer Theological Seminary thus allowing him to obtain a Bachelor of Divinity Degree. In 1995, he became one of the few black men who had received a PhD by graduating from Boston University. For all his hard work he was awarded a Doctorate of Philosophy in Systematic Theology. His educational history created a great leader for his fellow black brethren.</p>
<p>He strongly believed love and Christianity would be the best avenue for change. During the Civil Rights Movement he became the voice of many.</P>
<p> Thoughout his career he emulated the message that blacks must believe that they are not less than anyone else and that society's treatment of the African American community is unjust and morally wrong. He believed that
<a id=tribute-link href="http://www.thekingcenter.org/glossary-of-nonviolence/" target="_blank" rel="noopener noreferrer">non-violent</a> civil disobedience would lead to great change. He often pointed out unjust laws by illustrating these laws were in conflict with moral laws taught to every American. </p>
<p>Additionally, he warned his supporters that one must be willing to suffer the consequences of civil disobedience. He believed the consequences inflicted on his supporters would lead to a change in societies’ moral compass.</p>
<p>Martin Luther King Jr. believed he could change social awareness leading the vast majority of Americans to reject their racist ideology blindly practiced for so long. </p>
<p>He was thrust into the spot light of the Civil Rights Movement with the successful execution of the Montgomery bus boycott which ended segregation on buses. He participated in several sit-in demonstration with students to end the segregation of lunch counters in the South. And he was a key speaker at the March on Washington where he delivered what is considered to be one of the most prolific speeches in this country: "I have a dream". He participated in the Salma march to ensure voting rights for blacks were enforced. </P>
<p>Consequentially, the Civil rights act was passed on July 2, 1964 and the fair voting act was passed on August 6, 1965.</p>
<p> Martin Luther King Jr's. character is depicted in his quote in a Morehouse College student paper The Maroon Tiger: "We must remember that intelligence is not enough. Intelligence plus character - that is the goal of true education".
<p>On October 14, 1964 Martin Luther King received the Nobel peace prize for his non-violent tactics and gave a humble acceptance speech thanking 100 of thousands of less known participants of the movement without whom the movement would not have been successful.
<p> Martin Luther King continued to advocate for social justice by addressing
the issues of poverty, fair housing and the ending of the Vietnam war.</p>
<p> However, his life ended suddenly at the Lorraine motel in Memphis Tennessee on April 4, 1968 where he was <a href="https://en.wikipedia.org/wiki/Assassination_of_Martin_Luther_King_Jr" target="_blank" rel="noopener noreferrer">assassinated</a>. He was there to support fair working conditions and pay for the city sanitation workers. </p>
<p>The effect of his death was felt throughout the country as people mourned their leader and inspiration. </p>
<p> His wife Coletta King founded <a href="http://www.thekingcenter.org" target="_blank" rel="noopener noreerrer">The King Center</a> and advocated to have a national holiday in honor of Dr. Martin Luther King. </p>
<p>On November 2, 1983 Presindent Ronald Regan designated a national holiday on the 3rd Monday of every January to celebrate Martin Luther King's birthday.</p>
</div>
<footer >
<p style="text-align:right"> Image from Sutterstock by Irina Qiwi </p>
</footer>
<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
</body>
</html>
#main{
border-style: solid;
border-color: black;
text-shadow: 8px 8px 8px #ffffff;
background: linear-gradient(to right, #99ffff, #ffffff, #ffffff, #99ffff);
}
a: hover{
color: green;
}
a: visited{
color: purple;
}
#title{
font-family: Sans-Serif, Ariel, Helvetica;
text-align: center;
color: black;
text-shadow: 2px 2px 2px #99ffff;
}
#img-div{
//*width: 100%;
height: auto;*//
text-align: center;
}
#image{
margin: auto;
display: block;
text-align: center;
max-width: 100%;
border-radius: 90px;
}
#img-caption{
font-family: Helvetica;
line-height: 5px;
text-align: center;
padding: 0px;
font-size: 16px;
color: black;
text-shadow: 2px 2px 2px #99ffff;
}
h1{
font-family: Sans-Serif;
line-height: 25px;
margin-top: 50px;
}
h2{
padding: 0px;
line-height: 25px;
font-family: Helvetica;
}
#tribute-info{
line-height: 25px;
}
#tribute-link{
color: blue;
}
p{
margin-left: 70px;
margin-right: 70px;
color: black;
text-shadow: none;
text-align: left;
font-size: 18px;
}
@media screen and (max-width: 600px){
p{
font-size: 10px;
line-height: 20px;
margin-left: 5px;
margin-right: 5px;
}
h1{
font-size: 10px;
}
h2{
font-size: 10px;
}
#image-caption{
{
font-size: 8px;
}
}
Also see: Tab Triggers