From the previous chapter, we learned that HTML is a markup
language used for creating web pages. When working on creating web pages,
you will need the following tools and programs:
Step 1. Choose an HTML editor.
There are several HTML editors that web developers use for coding, such as: Notepad++, Visual Studio Code, Sublime, and WebStorm
For beginners,
Notepad
(PC) is a simple and easy-to-use
But if you find it difficult to setup your machine you can try our online text edit , it is very simple and fortable to use.
Step 2. Create a Repository or Folder.
Before starting writing code you have to create a folder where your file
will going to be store in order to avoid combining your file with unwanted
files. name your folder with the anything for better identification but
for the naming convention make sure to named it with useful name: like
my website
or
cookies website
or something very useful.
Step 3. Open your chosen HTML editor.
Launch the HTML editor that you have chosen to use for creation of website and locate the folder you have created.
Step 4. Create and Save HTML file.
Now that you have open the folder you created on your choosen text editor,
to create a file move the cursor to the editor menu and click on
file
then
new text file
After creation of the file you need to save it, to do that move the cursor
to the file and right click on it you will see options, then click on
rename
and chnage the name to something meaningful like:
index.html
Note: you can give it any name you want but must end with the extension of
.html
that is the only way the text editor will understand that you are going to
write
html
Step 3. Write your HTML code
Type or copy and paste your HTML code into the HTML editor.
Example
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Title of the Document</title>
</head>
<body>
<h1>Simple example.</h1>
<p>Some text you want to show here.</p>
</body>
</html>
Step 5. Check your HTML file in a browser.
Open the folder and right-clicking on the file and choosing "Open with" and selecting a browser (e.g. Google Chrome, Opera, Firefox).
Here is the sample of the result
Step 6. Validate your HTML code.
Use a
validator
to check the validity or syntactical correctness of your HTML code.
You can use online services like validator.w3.org by entering the URL of your web page, or you can use special programs like Tidy for checking local files.
Some HTML editors may also have built-in validators that allow you to check your code directly in the editor.
By following these steps, you can create web pages using an HTML editor, check them in a browser, and validate your HTML code to ensure its correctness.