Creating First HTML Document
HTML (Hypertext Markup Language) is used to create document on the World Wide Web. It is simply a collection of certain keywords called Tags that are helpful in writing the document to be displayed using a browser on Internet.
A browser understands and interpret the HTML tags, identifies the structure of the document and makes decision about presentation of the document.
Most HTML tags have two parts, an opening tag and closing tag. The closing tag is the same as the opening tag, except for the slash mark. The slash mark is always used in closing tags.
The essential tags that are required to create a HTML document are:
- <HTML> </HTML>
- <HEAD> </HEAD>
- <BODY> </BODY>
HTML Tag <HTML>
The <HTML> tag encloses all other HTML tags and associated text within your document. An HTML document has two distinct parts HEAD and BODY.
HEAD Tag <HEAD>
HEAD tag comes after the HTML start tag. It contains TITLE tag to give the document a title that displays on the browsers title bar at the top.
<HEAD>
<TITLE>Your title goes here</TITLE>
</HEAD>
BODY Tag <BODY>
The BODY tag contains all the text and graphics of the document with all the HTML tags that are used for control and formatting of the page.
The Format is:
<BODY>
Your Document goes here
</BODY>
An HTML document, web page can be created using a text editor, Notepad or WordPad. All the HTML documents should have the extension .html.
Example: Your First web page
Open text editor Notepad. Enter the following lines of code:
<HTML>
<HEAD>
<TITLE>My first Page</TITLE>
</HEAD>
<BODY>
WELCOME TO MY FIRST WEB PAGE!
</BODY>
</HTML>
Save the file as: myfirstpage.html and view the document in web browser.