Page 23 - Modular_V1.1_Flipbook
P. 23
For example <HR WIDTH="50%">
The WIDTH is the attribute of the <HR> tag which specifies the width of the horizontal line in
pixels or percentage. By default, the width is 100%.
RULES FOR WRITING HTML CODES
Container tags should always be closed properly.
Values given to the attributes should be enclosed within the double quotes.
Tag name should not contain spaces.
There should be no spaces between < and > in a tag.
Tags must be nested correctly.
HTML DOCUMENT STRUCTURE
A HTML document is a text file containing markup tags. The markup tags tell the Web browser
how to display the web page. A HTML file is saved with .htm or .html extension.
Basic Structure of HTML Document is as follows:
<HTML>
<HEAD>
<TITLE>Title of the web page</TITLE>
</HEAD>
<BODY>
Content of the page
</BODY>
</HTML>
A HTML page is divided into two sections called Head and Body.
Head contains the information which is not to be shown on the web page.
Body contains the information which is to be shown on the web page.
CREATING AND SAVING A HTML DOCUMENT
Let us start with the designing of first web page by using the basic tags.
Step 1 Open the Notepad and type the following HTML code:
<html>
<head>
<title> FIRST WEB PAGE </title>
</head>
<body bgcolor = "red" text = "white">
Let's explore the wonderful world
of HTML
HTML code in Notepad
</body>
</html>
HTML—An Introduction 21

