How to Create a Basic HTML Web Page
In this blog post, we will show you how to create a basic HTML web page with some common elements, such as headings, paragraphs, images, links, and lists. You will also learn how to save your HTML file and view it in a browser.
If you want to create your own website, you need to learn how to write HTML code. HTML stands for HyperText Markup Language, and it is the standard language for creating web pages. HTML code consists of tags, which are special keywords enclosed in angle brackets (< and >). Tags tell the browser how to display the content of the web page.
Step 1: Create a New File
To create a new HTML file, you can use any text editor, such as Notepad, Sublime Text, or Visual Studio Code. A text editor is a program that allows you to write and edit plain text files. You should not use a word processor, such as Microsoft Word or Google Docs, because they add extra formatting that can interfere with the HTML code.
To create a new file, open your text editor and click on File > New. Then, save the file with the extension .html. For example, you can name your file index.html or home.html. The name of the file does not affect the content of the web page, but it is good practice to use descriptive and meaningful names.
Step 2: Write the Basic Structure
Every HTML web page has a basic structure that consists of four main parts:
- The document type declaration: This tells the browser that the file is an HTML document. It is written as and it must be the first line of your HTML code.
- The html element: This is the root element of the web page. It contains all the other elements of the web page. It is written as and it must have a closing tag at the end of the file.
- The head element: This contains information about the web page, such as its title, character encoding, style sheets, and scripts. It is written as and it must have a closing tag .
- The body element: This contains the visible content of the web page, such as text, images, links, and forms. It is written as and it must have a closing tag .
The basic structure of an HTML web page looks like this:
<!DOCTYPE html>
<html>
<head>
<!-- Information about the web page goes here -->
</head>
<body>
<!-- Content of the web page goes here -->
</body>
</html>
3 comments
Thankyou for this post, I am a big big fan of this site would like to go along updated.
Hello! I just now wish to give a enormous thumbs up for that wonderful information you have here during this post. I’ll be coming back to your website for additional soon.
I simply wanted to say thanks yet again. I’m not certain the things I would’ve implemented without the entire recommendations provided by you about my problem. This was a real terrifying difficulty in my position, nevertheless witnessing the very specialized manner you handled that took me to jump for gladness. Now i am happier for your support and as well , hope you recognize what an amazing job that you are doing teaching men and women via your blog. I know that you have never come across any of us.