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 URLs 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 its URL and the proper URL extension.
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 esm.sh, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ESM 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.
<body style="margin-top: 60px;">
<div id="main">
<div class="jumbotron" id="img-div" style="margin-left:auto; margin-right:auto; width:80%">
<div class="container">
<h1 style="text-align: center"; id="title">Nikola Tesla</h1>
<h3 style="text-align: center";>The Poor Man's Genius</h3>
<img id="image" class="img-responsive" src="https://upload.wikimedia.org/wikipedia/commons/2/20/Nikola_Tesla%2C_with_his_equipment_Wellcome_M0014782.jpg" alt="Nikola Tesla sitting next to Tesla Coil"/>
<figcaption id="img-caption" style="background-color: white; padding: 10px;">Nikola Tesla pictured next to his infamous creation the Tesla Coil</figcaption></div>
<h2 style="text-align: center;">Chronological timeline of Nikola Tesla</h2>
<ul>
<li>1856 - July 10th, born during a thunderstorm in Austria-Hungary.</li>
<li>1863 - Nikola Tesla brother dies after falling from a horse at age 12.</li>
<li>1870 - Tesla moves to modern-day Carlstadt, Croatia to live with his aunt and uncle where he attends school. His teacher, Martin Sekulić, teaches him math & physics.</li>
<li>1873 - Tesla contracts Cholera and is bedridden and near death for 9 months. His father promises to send him to engineering school if he gets better.</li>1874 - He leaves for a neighboring town to both get better from Cholera and avoid the compulsory 3 year requirement in the army.</li>
<li>1875 - Tesla is enrolled at the Austrian Polytechnic School in Graz on a Military Border scholarship, but drops out two years later.</li>
<li>1878 - He takes his first job as a draftsman for a local engineering firm in Maribor, Slovenia.</li>
<li>1879 - Tesla's father dies, he is deported from Maribor (not having a residence permit), and he moves back to Gospić to teach at his old school</li>
<li>1884 - Moves to New York City and is immediately hired by Thomas Edison; Quits a year later after payment disputes.</li>
<li>1885 - Starts his own company Tesla Electric Light Company in New Jersey and after completing his design is forced out of his company by investors.</li>
<li>1886 - During the winter he was forced to work as a ditchdigger for $2 a day.</li>
<li>1888 - Tesla sells patent the AC Polyphase System to George Westinghouse for $25,000 in cash, $50,000 in notes and a royalty of $2.50 per horsepower for each motor.</li>
<li>1890 - Tesla developed some of the first neon and fluorescent illumination. Later it begins his lifelong obsession - the wireless transmission of energy.
<li>1891 - Tesla becomes an American citizen; The infamous Tesla Coil was invented.</li>
<li>1892 - Nikola Tesla is elected Vice President of the American Institute of Electrical Engineering, now coined IEEE.</li>
<li>1899 - Tesla observed strange rhythmic pulses on the his very sensitive radio receiver. Reports findings and is criticized.</li>
<li>1901 - He signs over 51 percent interest in his patents and inventions, including future ones, relating to both electric lighting and wireless telegraphy or telephony for a mere $150,000.00.</li>
<li>1903 - Wardenclyffe testing begins.</li>
<li>1906 - Wardenclyffe workers are laid off after J.P. Morgan withdraws support.</li>
<li>1909 - Nobel Prize for physics is shared between Guglielmo Marconi and Karl Ferdinand Braun for their efforts in discovering radio. Tesla is furious and tries to correct the injustice.</li>
<li>1916 - Tesla declares bankruptcy.</li>
<li>1943 - Tesla died alone and penniless at the age of 86</li>
<div class="container" style="text-align: center; padding-top: 20px;">
<span><h4>The present is theirs; the future, for which I really worked, is mine.</h4>
<h4><cite>— Nikola Tesla</cite></h4></span>
<span class="inline"><h3 id="tribute-info">Nikola Tesla was one of the greatest minds in our generation.<br> You can read more about his life at <a href="https://en.wikipedia.org/wiki/Nikola_Tesla" target="_blank" id="tribute-link">Wikipedia</a>.</h3></span>
</div>
</div>
<hr style="width: 80%;">
<p style="text-align: center;">Written and coded by <a href="https://www.freecodecamp.com/asg5704" target="_blank">Alexander S. Garcia</a></p>
</div>
</body>
Also see: Tab Triggers