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.
<!DOCTYPE html>
<html>
<head>
<title>Technical</title>
</head>
<body>
<nav id="navbar">
<header>
<h1>HTML TUTORIAL</h1>
<ul>
<a class="nav-link" href="#introduction"><li >INTRODUCTION</li></a>
<a class="nav-link" href="#prerequisite"><li >PREREQUISITE</li></a>
<a class="nav-link" href="#overview"><li >OVERVIEW</li></a>
<a class="nav-link" href="#basic_tags"><li >BASIC TAGS</li></a>
<a class="nav-link" href="#images"><li>IMAGES</li></a>
<a class="nav-link" href="#conclusion"><li>CONCLUSION</li></a>
<ul>
</header>
</nav>
<main id="main-doc">
<header>
HTML DOCUMENTATION
</header>
<section class="main-section" id="introduction">
<header >INTRODUCTION</header>
<P>
HTML stands for Hyper Text Markup Language, which is the most widely used language on Web to develop web pages.
HTML was created by Berners-Lee in late 1991 but "HTML 2.0" was the first standard HTML specification which
was published in 1995. HTML 4.01 was a major version of HTML and it was published in late 1999.
Though HTML 4.01 version is widely used but currently we are having HTML-5
version which is an extension to HTML 4.01, and this version was published in 2012.
</P>
</section>
<section class="main-section" id="prerequisite">
<header>PREREQUISITE</header>
<P>
Before proceeding with this tutorial you should have a basic working knowledge with Windows or Linux operating system,
additionally you must be familiar with..
</P>
<ol>
<li>Experience with any text editor like notepad, notepad++, or Edit plus etc.</li>
<li>How to create directories and files on your computer.</li>
<li>How to navigate through different directories.</li>
<li>How to type content in a file and save them on a computer.</li>
<li>Understanding about images in different formats like JPEG, PNG format.</li>
</ol>
</section>
<section class="main-section" id="overview">
<header>OVERVIEW</header>
<p>
HTML stands for Hypertext Markup Language, and it is the most widely used language to write Web Pages.
</p>
<p>
Hypertext refers to the way in which Web pages (HTML documents) are linked together. Thus, the link available on a webpage is called Hypertext.
</p>
<p>
As its name suggests, HTML is a Markup Language which means you use HTML to simply "mark-up" a text document with tags that tell a Web browser how to structure it to display.
</p>
<p>
Originally, HTML was developed with the intent of defining the structure of documents like headings, paragraphs, lists, and so forth to facilitate the sharing of scientific information between researchers.
Now, HTML is being widely used to format web pages with the help of different tags available in HTML language.
</p>
<code>
<p>HELLO WORLD</p>
</code>
<code>
<!DOCTYPE html>
<html>
<head>
<title>This is document title</title>
</head>
<body>
<h1>This is a heading</h1>
<p>Document content goes here.....</p>
</body>
</html>
</code>
</section>
<section class="main-section" id="basic_tags">
<header>BASIC TAGS</header>
<h6>Heading Tags</h6>
<p>
Any document starts with a heading. You can use different sizes for your headings. HTML also has six levels of headings,
which use the elements .
While displaying any heading, browser adds one line before and one line after that heading.
</p>
<code>
<!DOCTYPE html>
<html>
<head>
<title>Heading Example</title>
</head>
<body>
<h1>This is heading 1</h1>
<h2>This is heading 2</h2>
<h3>This is heading 3</h3>
<h4>This is heading 4</h4>
<h5>This is heading 5</h5>
<h6>This is heading 6</h6>
</body>
</html>
</code>
</section>
<section class="main-section" id="images">
<header>IMAGES</header>
<p>
Images are very important to beautify as well as to depict many complex concepts in simple way on your web page.
This tutorial will take you through simple steps to use images in your web pages.
</p>
<code>
<img src = "Image URL" ... attributes-list/>
</code>
<code>
<video src="vid url"></video>
</code>
</section>
<section class="main-section" id="conclusion">
<header>CONCLUSION</header>
<p>
You’ve come a long way in your journey to learn web development. This was, probably, the hardest part (although, you might disagree once we get to JavaScript).
You’ve learned how to create structured and functional HTML documents (even if they are plain looking) – everything else builds on this.
You can easily look up more information on the other 90 (or so) HTML tags we haven’t covered so far.
We will be looking at more HTML tags later in this tutorial series – introducing them as needed.
</p>
<p>
In the next set of tutorials, we will be looking at CSS (Cascading Style Sheets). CSS is how we manage the look and feel of a webpage – so you will not longer be stuck with the default presentation of your browser.
HTML provides the structure for HTML documents, CSS provides the appearance.
As always, the more you practice the better you get.
</p>
</section>
</main>
</body>
</html>
html,body{
margin: 0;
padding: 0;
top: 0;
background-color: rgb(217, 218, 219);
}
#navbar{
width: 25%;
top: 0px;
left: 0px;
margin: 0;
padding: 0;
height: 100vh;
position: fixed;
border-right: solid;
border-color:
rgb(96, 96, 96);
font-family: sans-serif;
}
#navbar h1{
text-align: center;
font-size: 35px;
}
#navbar ul{
height: 80%;
list-style: none;
overflow-y: auto;
overflow-x: hidden;
}
#navbar ul li{
text-decoration: none;
border-bottom: 2px solid #a4a4a5;
padding-top: 15px;
padding-bottom: 15px;
margin: 0;
font-size: 20px;
}
#navbar ul li:hover{
background: rgb(26,20,9);
color: 56,9,120;
transition: 1.2s;
}
#navbar ul li a:{
color:white;
}
#main-doc{
background-color: rgb(217, 218, 219);
margin-left: 25%;
padding-left: 10px;
padding-right: 5px;
font-family: cursive;
}
#main-doc header h2{
text-align: center;
border-bottom: solid;
text-shadow: 1px 2px;
font-family: sans-serif;
font-size: 30px;
}
#main-doc .main-section{
background-color: #fcfcff;
margin: 0;
padding: 10;
}
@media (max-width: 600px){
#navbar ul{
width: 100vw;
border: 1px solid green;
background: #fff;
}
#navbar{
position: absolute;
width: 100vw;
max-width: 300px;
padding: 0;
margin: 0;
border: none;
top: 0;
z-index: 1;
max-height: 250px;
}
#main-doc{
position: absolute;
margin: 0;
margin-top: 450px;
width: 100vw;
}
}
Also see: Tab Triggers