Structure of HTML :-
The HTML document is constructed with following important tags. These are-
HTML Tag <html>
The <html> tag represents the root of an HTML document, basically the <html> tag is the container for all other HTML elements. The opening and closing tags are same except the slash (/) mark. Slash mark is always used to closing tags.
Syntax:
<html>
----------
page title and other tag goes here
----------
</html>
Head Tag <head>
The head tag is comes after the html tag and it contains the title tag.
Syntax:
<html>
<head>
<title>My Webpage</title>
</head>
----------
other tag goes here
----------
</html>
Body Tag <body>
The rest other tags, text and graphics are contains by the body tag.
Syntax:
<html>
<head>
<title>My Webpage</title>
</head>
<body>
<h1>This is heading 1</h1>
<p> This is first paragraph</p>
----
------
</body>
</html>
To create a web page using HTML, first you need to open text editor like, notepad, notepad++, etc. and then type the basic html code as given below-
<html>
<head>
<title>
---------------------
Title of Webpage goes here
---------------------
</title>
</head>
<body>
---------------------
---------------------
All content of webpage goes here
---------------------
---------------------
</body>
</html>
Example:-
<html>
<head><title> My First Web page </title>
<body>
<h1>My First Heading</h1>
<h2>My First Heading</h2>
<h3>My First Heading</h3>
<h4>My First Heading</h4>
<h5>My First Heading</h5>
<h6>My First Heading</h6>
<p><b>My first paragraph.</b></p>
--------
--------
</body>
</html>
0 Comments