In this article, you will learn-
Writing and Testing HTML file
You can write an edit HTML file in any simple text editor such as Note Pad in windows etc .So open your text editor and start writing HTML code.
<html>
<HTML> is the very opening for any HTML Web Page. All the other element are written between <HTML> and </HTML> tag. </HTML> tag is placed in the end. <HTML> tell to the browser that this is an HTML Page.
So far what you have coded looks like this:
<HTML>
</HTML>
After opening your document with <HTML> you will start a new line and code
<HEAD> and </HEAD>
The <head> tag is basically container tags that contain some informational tag for browser and Search engine. For example <Title> tag which is not only display on the title bar as the title of page also tells the search engine that is on this page. Head tags also contain some more information about the author, copyright, keywords, etc.
In this simple page, we placed only Title Tag between Head Tag. Title tags define the title of the document and also Title tags tell search engines what your page is about. Everything in the title tag is appearing on the title bar.
Now your page coding is look like:
<html>
<head>
<Title> This is my first page </Title>
</head>
After Head tag we place another tag which is body tag. These tags contain actual contents which will be viewed on your Web page. After typing all contents write </BODY> tag.
So far your total coding in the text editor looks like this:
<html>
<head>
<title>My First Page</title>
</head>
<body>
</body>
</html>
Now Write something in between <BODY> and </BODY> Tag this matter is display of your HTML Web Page.
For Example:
<html>
<head>
<title>My First Page<title>
</head>
<body>
Hello HTML, This is My First page and contains HTML, HEAD, TITLE, and BODY Tag.
</body>
</html>
Now Save this File and give a name. Normally your text editor saves the file as a text file with txt extension so when you are going to save this file first select all file in Save as Type. And then give the file name with extension. For example learning.html
After saving this open this file in your browser.