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.
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<title>Roque SantaCruz</title>
<link rel="stylesheet" href="style.css">
<link href="https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;1,300&display=swap" rel="stylesheet">
</head>
<body>
<div id="title">
<h1>Roque Luis Santacruz Cantero</h1><br>
<p id="titleCaption">El veterano delantero de la selección paraguaya y del Club Olimpia está pasando por un
gran momento en su carrera futbolística.</p><br>
</div>
<div id="img-div">
<img id="image" src="https://www.abc.com.py/resizer/0ju3Ku0_SpsGl6NmEr6xvCjMb1o=/fit-in/770x495/smart/arc-anglerfish-arc2-prod-abccolor.s3.amazonaws.com/public/IN6CXSX4MJCPZI2I73IBQXCRJE.jpeg" alt="Roque SantaCruz festejando un gol convertido con la casaca de Olimpia en Para Uno">
<br>
<span id="img-caption">Roque Santacruz disputó con Olimpia la mejor temporada de su carrera en cuanto a goles: 26 en 34 partidos jugados</span><br>
</div>
<div id="timeline">
<h2>Timeline de la carrera de Roque Santacruz</h2><br>
<ul>
<li><strong>1997:</strong> Debuta con la camiseta de Olimpia a la edad de 15 años</li>
<li><strong>2007:</strong> Es transferido al Bayern Munich de Alemania</li>
<li><strong>2009:</strong> Deja Alemania para buscar nuevos aires en Inglaterra: concretamente en el Blackburn Rovers de la premier League.</li>
<li><strong>2011:</strong> Después de una gran temporada en Blackburn, es transferido al Manchester City por una cifra récord para el futbol paraguayo: 30 millones de dólares.</li>
<li><strong>2011:</strong> En el 2011 vuelve al Blackburn cedido a préstamo por un año.</li>
<li><strong>2011/2012:</strong> Pasa al futbol espa;ol: transferido al Real Betis Balompie.</li>
<li><strong>2012:</strong> En el 2012 pasa al Málaga de La Liga.</li>
<li><strong>2015:</strong> Traspié en su carrera: no tuvo un buen paso por el Cruz Azul de México.</li>
<li><strong>2016:</strong> La vuelta del niño mimado: En el 2016 se produce su retorno al club de sus amores: El Olimpia de Paraguay.</li>
</ul>
<h3>Lee mas sobre Roque Santacruz <a href="https://es.wikipedia.org/wiki/Roque_Santa_Cruz"> aqui</a>.</h3>
</div>
</body>
<footer>
</footer>
</html>
body {
background-color: white;
}
#title {
font-size: 1em;
font-family: 'Lato';
margin-left: auto;
margin-bottom: 50px;
display: block;
text-align: center;
background-color: gainsboro;
padding: 1em;
color: #2b2828;
}
#titleCaption {
font-style: italic;
}
#img-div img{
display: block;
align-content: center;
margin: auto;
}
#img-caption {
font-size: 1em;
font-family: 'Lato';
display: block;
text-align: center;
color: #2b2828;
}
#timeline {
padding: 2em;
background-color: gainsboro;
}
#timeline h2{
text-align: center;
font-family: 'Lato';
background-color: gainsboro;
color: #2b2828;
}
#timeline ul {
margin: 5px 20% 5px 20%;
font-family: 'Lato';
color: #2b2828;
}
#timeline h3 {
text-align: center;
margin-top: 5%;
font-family: 'Lato';
background-color: gainsboro;
color: #2b2828;
}
@media (max-width: 400px) {
img {
display: flex;
width: 100%;
}
#timeline {
margin: 5px 1em 5px 1em;
}
}
Also see: Tab Triggers