Introdution To HTML
Introdution To HTML
TO HTML
HTML CONTENTS
INTRODUCTION OF HTML
OBJECTIVE OF HTML
WORLD WIDE WEB
HTML TOOLS
HTML TERMINOLGY
HOW TO CREATE AN HTML DOCUMENT
SAVING AND VIEWING A HTML DOCUMENT
TEXT TEGS
SPECIAL CHARTACTER
ADVANTAGES OF HTML
DISADVANTAGES OF HTML
INTRODUCTION OF HTML
HTML is a language for describing web pages.
HTML stands for Hyper Text Markup Language
HTML is not a programming language, it is
a markup language
A markup language is a set of markup tags
HTML uses markup tags to describe web pages
INTRODUCTION OF HTML
HTML (Hypertext Markup Language) is used to create
document on the World Wide Web. It is simply a
collection of certain key words called ‘Tags’ that are
helpful in writing the document to be displayed using a
browser on Internet.
It is a platform independent language that can be
used on any platform such as Windows, Linux,
Macintosh, and so on. To display a document in web it is
essential to mark-up the different elements (headings,
paragraphs, tables, and so on) of the document with
the HTML tags.
INTRODUCTION OF HTML
To view a mark-up document user has to open the
document in a browser. A browser understands and
interpret the HTML tags, identifies the structure of the
document (which part are which) and makes decision about
presentation (how the parts look) of the document.
HTML also provides tags to make the document
look attractive using graphics, font size and colors. User
can make a link to the other document or the different
section of the same document by creating Hypertext Links
also known as Hyperlinks.
OBJECTIVE OF HTML
<HTML>
<HEAD>
.............
.............
.............
</HEAD>
An HTML document has two distinct parts HEAD
and BODY
<BODY>
.............
.............
.............
</BODY>
</HTML>
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. The Format is:
<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>
BODY Tag <BODY>
An HTML document, web page can be
created using a text editor, Notepad or
WordPad. All the HTML documents should
have the extension .htm or html. It require a
web browser like Google Chrome or
Netscape communicator to view the
document.
CREATING A BASIC
STARTING DOCUMENT
<HTML>
<HEAD>
<TITLE>My First WebPage</TITLE>
</HEAD>
<BODY>
Welcome to Grade 9, St. ________
of Holy Family Montessori.
</BODY>
</HTML>
Attributes used with <BODY>
BGCOLOR: used to set the background
color for the document Example:
<BODY BGCOLOR="yellow">
Your document text goes here.
</BODY>
Attributes used with <BODY>
TEXT: used to set the color of the text of the
document Example:
<BODY TEXT="red">Introduction to HTML::
77
Document text changed to red color
</BODY>
Document text changed to red color.
Attributes used with <BODY>
MARGINS: set the left hand/right hand margin of the document LEFTMARGIN: set the
left hand margin of the document Example:
<BODY LEFTMARGIN="60">
This document is indented 60 pixels from the left hand side
of the page.
</BODY>
TOPMARGIN: set the left hand margin of the document Example:
<BODY TOPMARGIN="60">
This document is indented 60 pixels from the top of the page.
</BODY>
Attributes used with <BODY>
Step-3: Save the file as myfirstpage.html (go to File-Save As give File name:
myfirstpage.html-choose save as type: All Files-click save)
Step-4: Viewing document in web browser (open Internet Explorer-click on File-Open-
Browse-select the file myfirstpage.html-click open-click ok
TEXT TEGS
The character formatting tags are used to specify how a particular text should be displayed
on the screen to distinguish certain characters within the document.
The most common character formatting tags
are
Boldface <B>: displays text in BOLD
Example: Welcome to the <B> Internet World </B>
Output: Welcome to the Internet World
Italics <I>: displays text in Italic
Example: Welcome to the <I> Internet World </I>
Output: Welcome to the Internet World
Subscript <SUB>: displays text in Subscript
Superscript <SUP>: displays text in Superscript
Small <SMALL>: displays text in smaller font as compared to normal font
Big <BIG>: displays text in larger font as compared to normal font
Underline<U>specifies that the enclosed text be underline
Example:<U> hello</u>
Output: hello
Font Colors and Size:<FONT>
By using <FONT> Tag one can specify the colors, size of the text. Example:
<FONT> Your text goes here </FONT>
Attributes of <FONT> are:
- COLOR: Sets the color of the text that will appear on the
screen. It can be set by giving the value as #rr0000 for red (in RGB hexadecimal format), or
by name. Example: <FONT COLOR="RED"> Your text goes here </FONT>
Font Colors and Size:<FONT
SIZE: Sets the size of the text, takes value between 1 and
7, default is 3. Size can also be set relative to default size
for example; SIZE=+X, where X is any integer value and it will add with the default size.
Example:
<FONT SIZE=5> Font Size changes to 5 </FONT>
FACE: Sets the normal font type, provided it is installed on the user’s machine.
Example:
<FONT FACE="ARIAL"> the text will be displayed in Arial</FONT>
An HTML document formatText.html shows the use of
Character Formatting Tags.
<HTML>
<HEAD>
<TITLE>
Use of Character Formatting Text Tags
</TITLE>
</HEAD>
<BODY>
<H1><I> Welcome to the world of Internet</I></H1>
It is a
<FONT COLOR="BLUE" SIZE="4">
<U>Network of Networks</U>
</FONT>
</BODY>
</HTML>
OUTPUT
It is a Network of Networks
MARQUEE TAG
This tag is used text horizontally across the screen.it is mainly used to deliver a specfic
message to the visitor or to scroll Ads on a page.
Example: <marquee> hello world></marquee>
Attributes of marquee tag
The empty tag <BR> is used, where the text needs to start from a new line and not continue on
the same line. To get every sentence on a new line, it is necessary to use a line break.
Example:
<BODY>National Institute of Open Schooling <BR>
B-31B, Calipash Colony <BR>
New Delhi-110048</BODY>
Output:
National Institute of Open Schooling
B-31B, Calipash Colony
New Delhi-11004
Using Preformatted Text Tag: <PRE>
<HTML>
<HEAD>
<TITLE>
Use of Paragraph, Line break and preformatted text Tag
</TITLE>
</HEAD>
<BODY>
HTML Tutorial
<P>
HTML stands for Hypertext Markup Language
It is used for creating web page. It is very simple
and easy to learn.
An HTML document control.html shows the use of <P>,
<BR> and <PRE>
</P>
<P>
HTML stands for Hypertext Markup Language.<BR>
It is used for creating web page. It is very simple<BR>
and easy to learn.<BR>
</P>
<PRE>
HTML stands for Hypertext Markup Language
It is used for creating web page. It is very simple
and easy to learn.
</PRE>
</BODY>
</HTML>
OUTPUT
HTML Tutorial
HTML stands for Hypertext Markup Language. It is used for creating web page. It is very
simple and easy to learn.
An empty tag <HR> basically used to draw lines and horizontal rules. It can be used to separate two
sections of text.
Example:
<BODY>
Your horizontal rule goes here. <HR>
The rest of the text goes here.
</BODY>
Output:
Your horizontal rule goes here.
SIZE: Determines the thickness of the horizontal rule. The value is given as a pixel value.
Example: <HR SIZE="3">
WIDTH: Specifies an exact width of HR in pixels, or arelative width as percentage of the document width.
Example: <HR WIDTH="50%">, horizontal rule a width a 50 percent of the page width.
ALIGN: Set the alignment of the rule to LEFT, RIGHT and CENTER. It is applicable if it is not equal to width of the
page.
NOSHADE: If a solid bar is required, this attribute is used; it specifies that the horizontal rule should not be shaded at all.
COLOR: Set the color of the Horizontal rule.
Example: <HR COLOR="BLUE“>
Example of <HR> with its attribute:
<HR ALIGN=' 'CENTER' ' WIDTH=' '50%' ' SIZE=' '3" NOSHADE
COLOR="BLUE“>
HEADING: <H1>.............<H6>tags
HTML has six header tags <H1>, <H2>...........<H6> used to specify section headings. Text
with header tags is displayed in larger and bolder fonts than the normal body text by a web
browser. Every .header leaves a blank line above and below it when displayed in browse.
Example: An HTML document, headings.html shows the
different section headings
.
<HTML>
<HEAD>
<TITLE>
Section Heading
</TITLE>
</HEAD>
<BODY>
<H1> This is Section Heading 1 </H1>
<H2> This is Section Heading 2 </H2>
<H3> This is Section Heading 3 </H3>
<H4> This is Section Heading 4 </H4>
<H5> This is Section Heading 5 </H5>
<H6> This is Section Heading 6 </H6>
</BODY>
</HTML>
Viewing output of HTML document
headings.html in browse
There are certain special characters that can be used while creating document.Following
are some special character:
Symbols Entity
©, ® ©, ®
¼, ½, ¾ ¼, ½, ¾
÷, <, >, ≤,≥ ÷, <, >, &le, &ge
& &
♣♠♥ &spades, &clubs, &hearts
All these special character must be ended with a semicolon;
Example:
<PRE>
The copyright symbol is: ©
The registered rank is: ®
</PRE>
Output:
The copyright symbol is:©
The registered rank is:®
ADVANTAGES OF HTML
Easy to use
Loose syntax (although, being too flexible will not comply with standards).
Supported on almost every browser, if not all browsers.
Widely used; established on almost every website, if not all websites.
Very similar to XML syntax, which is increasingly used for data storage.
Free - You need not buy any software.
Easy to learn & code even for novice programmers.
DISADVANTAGES OF HTML