INTRODUTION TO HTML
HTML CONTENTS
INTRODUCTION OF HTML
INTRODUCTION OF HTML
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 e l eme n t s ( h e a d i n g s , p a r a g r a p h s , t a b l e s , a n d s o o n ) o f t h e document with the HTML tags. To view a mark-up document u s e r h a s t o o p e n t h e d o c u m e n t i n a b r o w s e r . A b r o w s e r 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�
WORLD WIDE WEB�
HTML TOOLS�
- Text based or code based which allows one to see the HTML code as one is creating a document.e.g. Notepad.
- Netscape composer
HTML TOOLS
b) Web Browser: it is the program that one uses to view and test the HTML documents. They translate Html encoded files into text,image,sounds and other features user see. Microsoft Internet Explorer,Netscape,Mosaic Chrome are examples of browsers that enables user to view text and images and many more other World Wide Web featueres.They are software that must be installed on user computer.
HTML TERMINOLGY�
HTML TERMINOLGY
b) Attribute: Attribute is the property of an tag that specified in the opening angle brackets. It supplies additional information like color,size,home font-style etc to the browser about a tag. E.g. most of the common attributes are height, color,width,src,border,align etc.
c) DTD: Document Type Definition is a collection of rules written in standard Generalized Markup Language(SGML).HTML is define in terms of its DTDS. All the details of HTML tags, entities and related document structure are defined in the DTDS.
d) ELEMENT: Element is the component of a document’s structure such as a title, a paragraph or a list. It can include an opening and a closing tag and the contents within it.
HOW TO CREATE AN HTML DOCUMENT
HTML Tag <HTML>
Your Title and Document (contains text with HTML tags) goes here
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 e.g. </HTML>. The slash mark is always used in closing tags.
�An HTML document has two distinct parts HEAD and BODY�
HEAD Tag <HEAD>
<HEAD>
<TITLE>
Your title goes here
</TITLE>
</HEAD>
BODY Tag <BODY>
<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 .htm or html. It require a web browser like Internet
Explorer or Netscape Navigator/Communicator to view the
document.
Attributes used with <BODY>
<BODY BGCOLOR="yellow">
Your document text goes here.
</BODY>
<BODY TEXT="red">Introduction to HTML:: 77
Document text changed to red color
</BODY>
Document text changed to red color
Attributes used with <BODY>
<BODY LEFTMARGIN="60">
This document is indented 60 pixels from the left hand side
of the page.
</BODY>
<BODY TOPMARGIN="60">
This document is indented 60 pixels from the top of the page.
</BODY>
Attributes used with <BODY>
<BODY BACKGROUND="filename. if">
Your document text goes here
</BODY>
Follow the steps to create and view in browser
<HTML>
<HEAD>
<TITLE>
My first Page
</TITLE>
</HEAD>
<BODY>
WELCOME TO MY FIRST WEB PAGE
</BODY>
</HTML>
�S A V I N G A N D V I E W I N G A H T M L DOCUMENT�
TEXT TEGS�
-Character-level tags and attributes which applies to formatting of individual letters or words.
-Paragraph level tags and attributes which apply
=To formatting of sections of text.
Character Formatting Tag
The most common character formatting tags are
Example: Welcome to the <B> Internet World </B>
Output: Welcome to the Internet World
Example: Welcome to the <I> Internet World </I>
Output: Welcome to the Internet World
Example:<U> hello</u>
Output: hello
Font Colors and Size:<FONT>
<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
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.
<FONT SIZE=5> Font Size changes to 5 </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
Welcome to the world of Internet
It is a Network of Networks
MARQUEE TAG
Attributes of marquee tag�
paragraph Formatting Tag
The most common paragraph formatting tags are
T h i s t a g < P > i n d i c a t e s a p a r a g r a p h ,u s e d t o s e p a r a t e two paragraphs with a blank line.
<P> Welcome to the world of HTML </P>
<P> First paragraph. Text of First paragraph goes here</P>
Welcome to the world of HTML
First paragraph. Text of First paragraph goes her
Using Line Break Tag: <BR>
<BODY>National Institute of Open Schooling <BR>
B-31B, Calipash Colony <BR>
New Delhi-110048</BODY>
National Institute of Open Schooling
B-31B, Calipash Colony
New Delhi-11004
Using Preformatted Text Tag: <PRE>
<PRE>
National Institute of Open Schooling
B-31B, Kailash Colony
New Delhi-110048
</PRE>
National Institute of Open Schooling
B-31B, Kailash Colony
New Delhi-11004
An HTML document control.html shows the use of <P>,�<BR> and <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 stands for Hypertext Markup Language. It is used for creating web page. It is very simple and easy to learn.
HTML stands for Hypertext Markup Language.
It is used for creating web page. It is very simple
and easy to learn.
HTML stands for Hypertext Markup Language.
It is used for creating web page. It is very simple
and easy to learn.
Using Horizontal Rule Tag: <HR>
<BODY>
Your horizontal rule goes here. <HR>
The rest of the text goes here.
</BODY>
Your horizontal rule goes here.
The rest of the text goes her
<HR> accepts following attributes
Example: <HR SIZE="3">
Example: <HR WIDTH="50%">, horizontal rule a width a 50 percent of the page width.
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
This is Section Heading 1
This is Section Heading 2
This is Section Heading 3
This is Section Heading 4
This is Section Heading 5
This is Section Heading 6
SPECIAL CHARTACTER�
©, ® ©, ®
¼, ½, ¾ ¼, ½, ¾
÷, <, >, ≤,≥ ÷, <, >, &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>
The copyright symbol is:©
The registered rank is:®
ADVANTAGES OF HTML�
DISADVANTAGES OF HTML�
��