What is HTML?
HTML stands for "Hyperlink Text Markup Language". It is what every single website is made out
of in its core! One of the most
basic languages making it the easiest to learn in my personal opinion!
HTML File Setup
Before we can start creating any HTML elements, we need to setup the "index.html" document!
To do this simply copy and paste the content below into your "index.html" file!
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
</body>
</html>
Editing Document Title
In the metadata section of the code you will see something called "title" followed by
"Document".
Change "Document" to whatever you want your website's title to be! This will appear in the
tab of
your page as well as on all search engines!
HTML Elements
An element in HTML can be recognized by the "<" and ">" brackets with an element name inside.
When an element is closed you will see the following order: "<"title">"Title
Here"<"/title">".
The slash at the beginning of the element symbolizes that the element is closed.
Writing HTML Elements
When you start to actually code a few HTML elements into your website, you need to make sure
that all of your new HTML is being placed with the "body" tags!
Heading Elements
Creating headings on a website is one of the most used elements in HTML! Being able to tell
search
engines which text is more important than others is essential for good SEO (Search Engine
Optimization) practises. An example of all heading elements can be found below!
<h1>This element should only be used once per page! Most important keyword of the page.</h1>
<h2>Smaller than the h1 element</h2>
<h3>Each number that is bigger means the text will be smaller</h3>
<h4>You get the point by now</h4>
<h5>Very small text</h5>
<h6>The smallest possible header tag</h6>
Paragraph Elements
Paragraphs are obviously a very common occurrence when writing anything, which is why we want
to wrap our long strand of text within paragraph tags! An example of a paragraph element can
be found below!
<p>This is a little paragraph because we are almost professional HTML programmers now! If you think im joking wait until you finish this section of your website design education!</p>
Image Elements
Having the ability to add an image to your website is probably the second most utilized
element when designing a website! An example of how to create an image element can be found
below!
<img src="https://pixelpanel.pixelhost.org/assets/img/pixelhost/banner.svg" alt="title-of-the-image">
List Elements
List elements are also highly utilized when learning how to design a website! They allow you
to stack information horizontally or
vertically! In english terms, used as bullet points. Commonly used in navbars as well as
footers of a website.
Unordered List Example Below:
<ul>
<li>Item One</li>
<li>Item Two</li>
<li>Item Three</li>
</ul>
Ordered List Example Below:
<ol>
<li>Item One</li>
<li>Item Two</li>
<li>Item Three</li>
</ol>
Div Elements
Divs are by far the most important element that will be utilized throughout your venture of
learning how to design a website! Divs
enable you to separate sections, allowing you to have a bunch of
flexibility when using CSS (Cascading Style Sheet) classes to style your elements!
<div class="classname">
<img src="https://pixelpanel.pixelhost.org/assets/img/pixelhost/banner.svg" alt="title-of-the-image">
<h1>Title Here</h1>
<ul>
<li>Reason One</li>
<li>Reason Two</li>
</ul>
<p>You are basically a professional website designer now!</p>
</div>
Div Elements
Now that you have learned the basics of HTML it's time to make test what you have learned. To
utilize some of the elements we learned above
your "index.html" file should now look like this below!
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div class="classname">
<img src="https://pixelpanel.pixelhost.org/assets/img/pixelhost/banner.svg" alt="title-of-the-image">
<h1>Title Here</h1>
<ul>
<li>Reason One</li>
<li>Reason Two</li>
</ul>
<p>You are basically a professional website designer now!</p>
</div>
</body>
</html>