How to create a website using html
Reading time: min
want to learn how to create your first HTML website? As the first lesson of the HTML course, you will learn the basics of an HTML document and how to run your first HTML site. Enjoy.
Let’s have some HTML overviews, What is it? HTML stands for HyprtText Markup Language which is basically the structure of websites (like bone to body). It’s the starting point to a web developer carrier and it’s not a programming language.
Basic HTML elements
As HTML has been compared with a sandwich, I shall break it down to you the same way to you as well.
In HTML we got lots of Elements to build our website structure and they all consist of
<opening tag> ...content...
</closing tag> and content between them.
<tag> this is called an opening tag and
</tag> is a closing tag; With the content between, the whole thing is called Element
It’s the same way as in a sandwich where we got two slices of bread as opening and closing, also all the content between
Note: you can make nested elements(putting elements inside another)
Now, there are some basic HTML doc structures that we have to follow in order to lay down our website structure. Here is a picture to show you how the very basic structure of it works, and I shall explain every bit of it to you later.
<html> ... </html>
It’s the root of the whole structure just like a sandwich which contains two main sub-elements in its content named head and body elements.
<head> ... </head>
This is where we keep our non-visual elements and content (I shall explain it to you later in this lesson). For now, just leave it empty (you can also skip this element if you don’t want anything inside it).
This where you put data like
<title> as you saw in the previous lesson like:
<title> page title </title>
<body> ... </body>
And this is where we keep our visual elements and content.
You will find elements about headings, paragraphs, lists, images, links and etc. These are just a few of what you will be dealing with here.
Let’s create your first HTML page
There is no compiler needed here so it’s very easy to run the code and see the results.
HTML files are basically text files so you can even run them in any text editor. But as you get higher, the more advanced IDEs (integrated development environment) can give you more features such as Atom and Visual studio code(VS) and also sublime text (which is known for its lite weight). It’s a personal touch what to choose.
But all we need right now is just a simple notepad. I will be guiding you through the road.
- Create the text file(in this example, notepad) and name it anything you like.
- Write the basic HTML structure you learned in the last example.
- After saving the code, change the file name extension from .txt to .html.
- Now open the new HTML file and you should see the text that you wrote in there.
Here you are with your very first website.
In the next lesson, you will learn more about new and exciting elements.
Was this page helpful?
What was the most helpful point of this page for you?
Thanks for your cooperation!