SlideShare a Scribd company logo
Html
HTML And Its Capabilities
• It is a document-layout and hyperlink-
specification language
• It tells the browser how to display the
contents of a hypertext document.
• It is neither a word processing tool nor a DTP
tool ; not even a programming language. It is
just a page-layout and hyperlink specification
language.
HTML
• The instructions are not compiled by a
traditional compiler but by a WWW
browser.
• It stands for Hyper Text MarkUp Language.
• It is a language that supports multimedia
and new page layout features.
• Def: It is a simple web page layout language used to design web pages.
Software for HTML coding
• Text Editor like
1. Notepad
2. Wordpad
• HTML file Extension
Files can be saved with .htm or .html extension.
HTML Documents
• HTML is made up of elements or tags and
attributes which work together to identify
document parts and tell browsers how to
display them.
• The elements are arranged into sections
according to where the elements can be
used .
Group of Elements
• The HEAD Elements – Only elements that are
allowed in HEAD section of the documents like
Title element.
• The BODY Elements – Only elements that are
allowed in the BODY section of the document.
In this section , elements are broken into
groups like Font element, P element.
Naming Convention
• All elements are enclosed in < > brackets.
• The element names are not case
sensitive.
Tags and Attributes
• Tags : It is a coded HTML command that
indicates how part of web page should
be displayed ex: <Title>
• Attributes : It is a special word used
inside tag to specify additional
information to tag such as color,
alignment.
Two Categories of Tags
• Container Tag: This type of HTML
elements require pair tags i.e. a starting
as well as ending tag eg : <Title>…
</Title>.
• Empty Tag : This type of HTML elements
require just a starting tag and not an
ending tag eg : <BR>, <IMG>,<HR>
HTML Document Structure
• <HTML>
<HEAD>
<TITLE> ……..</TITLE>
</HEAD>
<BODY>….
….. Body Section(Compulsory Part)
</BODY>
</HTML>
Head Section
(Optional Part)
HTML Tags
• <HTML> It encloses the entire HTML
document. It is a container tag.
• <HEAD> It encloses the head section of the
document. It is a container tag. The title is
always in the head section. It is optional.
Head Section
This section consists of Head Element ,Title tag , meta tag , BASE tag. <head> and
<title> tags are strongly recommended tags.
Starting Tag Description Closing Tag
<head> It begins head section of HTML document and used to
display header of the document.
</head>
<title> It is a parameter tag of <head>. It contains information that
display in title bar of web browser
</title>
Try it : Open Notepad, write the
following code:
<html>
<head>
<title>
HTML
</title>
Welcome to HTML programming
</head>
</html>
Save it as first.html then open it in
Internet Explorer , see the output
Title of the web page
Path and file name
Header of the document
Body Section
Tag Description Example
<Body> Body of web
document </Body>
It contains all the contents of a
document and also various parameter
tags.
Attributes of body tag Its attributes value is applicable to
whole document.
Bgcolor = color-name Used to set background color of web
page. Default background color is
White.
<body bgcolor = green>
Background = “Path” Used to insert an image in the
background of web page.
<body background =
“D:im1.jpg”>
Text = color-name Used to set foreground or text color of
web page. Default text color is Black.
<body text = red>
Link = color- name Used to set color of unvisited link.
Default color is blue.
<body link = teal>
Alink = color – name Used to set color of active link. Default
color is red.
<body alink = maroon>
Vlink = color –name Used to set color of visited link. Default
color is purple.
<body vlink = yellow>
Tag Description Example
Topmargin = n
Where n is a
number
It specify the distance between the top of the
document and the top of the browser window.
<body topmargin = 10>
Leftmargin = n
where n is a
number
It specify the distance between the left side of
the document and the left edge of the browser
window.
<body leftmargin = 20>
Body Section contd…
Try it
<html>
<head>
<title>
HTML
</title>
Welcome to HTML programming
</head>
<body bgcolor = green text = red topmargin = 20 leftmargin = 10>
This is a demo program.
</body>
</html>
Save it as second.html then open it in Internet
Explorer , see the output
<Body bgcolor = green topmargin = 20 leftmargin = 10>
<body text = red>
Font Tag and Basefont Tag
Tag Description Example
<Font>… </Font>
<basefont>…</basefont>
It is used to give specification of the size, color and typeface of the enclosed text.
It is used to give specification of the size, color and typeface of the enclosed text.
It occurs only once in a web document.
Attributes of font tag Its attributes value is applicable to portion of document enclosed
between <font> and </font>.
face = typeface Used to set typeface of enclosed text of web page. <font face = “arial”>
size = n Used to set the relative size of the text. The default value is 3. The valid
value ranges from 1-7 where 1 is the smallest and 7 is the largest.
<font size = “5”>
color= color-name Used to set text color of web page. Default text color is Black. <font color =teal>
Try it
<html>
<head>
<title>
HTML
</title>
Welcome to HTML programming
</head>
<body bgcolor = green text = red topmargin = 20 leftmargin = 10>
This is a demo program.
<font face = “arial” size = 5 color =orange> D</font>emonstrate
</body>
</html>
Save it as third.html then open it in
Internet Explorer , see the output
Note:Try basefont tag in same example
<font face = Arial size = 5 color = orange>
Center Tag
Tag Description Example
<center>…</center> It is used to center the content between the current left and right margins.It is
used to center text, image or any other embedded object.
Try it
<html>
<head>
<title>
HTML
</title>
Welcome to HTML programming
</head>
<body bgcolor = green text = red topmargin
= 20 leftmargin = 10>
This is a demo program.
<center><font face = “arial” size = 5 color
=orange> D</font>emonstrate</center>
</body>
</html>
Save it as four.html then
open it in Internet
Explorer , see the output
BR Tag
Tag Description Example
<br> It stands for Break and it is an empty element. It is used to insert single carriage
return in a web document
Try it
<html>
<head>
<title>
HTML
</title>
Welcome to HTML programming
</head>
<body bgcolor = green text = red topmargin
= 20 leftmargin = 10>
This<br> is a demo<br> program.<br>
<center><font face = “arial” size = 5 color
=orange> D</font>emonstrate</center>
</body>
</html>
Save it as five.html then
open it in Internet
Explorer , see the output
HR Tag
Tag Description Example
<hr> It stands for Horizontal Rule and it is an empty element. It is used to insert
horizontal line for dividing information or section
Attributes of <HR>
size It indicates thickness of the lines in pixels. Default is 2 pixels. <hr size = 3>
width It defines the horizontal width of the line. Default is page width. It is
measure in pixel or can be given in %age of the page width
<hr width = 5>
align It is used to align line at left, center and right <hr align = center>
color It is used to change color of rule <hr color = purple>
noshade It is used to display a solid black line that has no shading <hr noshade>
Try it
<html>
<head>
<title>
HTML
</title>
Welcome to HTML programming
</head>
<body bgcolor = green text = red topmargin = 20 leftmargin = 10>
This is a demo program.
<hr size = 3 width = 50% align = center color = purple > <font size
= +5> Use of Horizontal Rule</font>
<hr noshade>
</body>
</html>
Save it as six.html then
open it in Internet
Explorer , see the output
Comment Tag
Tag Description Example
<comment>…</comment>
<!--- comment -
It is ignored by web browser. It is used to explain code and also helps in editing
code later. It is used to include multiline comment
It is used for single line comment.
Try it
<html>
<head>
<title>
HTML
</title>
Welcome to HTML programming
</head>
<body bgcolor = green text = red topmargin
= 20 leftmargin = 10><comment> This is a first
web program to explain different tags used in
HTML</comment>
This<br> is a demo<br> program.<br>
<center><font face = “arial” size = 5 color
=orange> D</font>emonstrate</center>
</body>
</html>
Save it as six.html then
open it in Internet
Explorer , see the output
Paragraph Tag
Tag Description Example
<p>…</p> It stands for Paragraph. It is used to insert a line break with extra space in the
beginning and for dividing HTML document in paragraphs.
<p>hello
friend</p>
Attributes <p> has only one attribute that is align
Align = left|center|right This attribute is used to align paragraph left, center or right.. Default alignment
is left.
<p align =
right>…</p>
Try it
<html>
<head>
<title>
HTML
</title>
Welcome to HTML programming
</head>
<body bgcolor = green text = red topmargin = 20
leftmargin = 10>
<p align = center><Hr>Use of paragraph tag</hr></p>
<p> It is used to divide HTML document in paragraphs</p>
</body>
</html>
Save it as seven.html then
open it in Internet
Explorer , see the output
Heading Tag
Tag Description Example
<Hn>…</Hn> where n is
from 1 to 6
It stands for Heading. It defines six levels of headings. It is used to give document
heading or section heading . H1 is the biggest heading and H6 is the smallest one
Attributes <Hn> has only one attribute that is align
Align = left|center|right This attribute is used to align paragraph left, center or right.. Default alignment
is left.
<H1 align =
right>…</H1>
Try it
<html>
<head>
<title>
HTML
</title>
Welcome to HTML programming
</head>
<body bgcolor = green text = red topmargin = 20
leftmargin = 10>
<p align = center><Hr><h1>Use of paragraph
tag</h1></hr></p>
<p> It is used to divide HTML document in paragraphs</p>
</body>
</html>
Save it as eight.html then
open it in Internet
Explorer , see the output
Tag Description Attributes
<UL>…</UL>
<OL>…</OL>
<DL>…</DL>
It stands for Unordered List. Also known as Bulleted List or Unnumbered List
It stands for Ordered List.. Also known as Numbered List.
It stands for Definition List.
Type
Type and Start.
<LH>
<LI>
<DT> and <DD>
It stands for list header . It identify list header . It is used with Ordered &
Unordered List . It is used just after <OL> and <UL>.
It stands for list item. It identify the items of the list . It is used with Ordered
& Unordered List . It is used just after <OL> and <UL>.
& list Item used with Ordered and Unordered list.
It stands for definition term and data definition used with Definition List
Using Lists In HTML
To display list item in your document ,HTML provides several ways to display a list of
items.
Attributes Explanation Example
Type= disc/square/circle In unordered list , it specifies the bullet style to use. The
style can be a disc, square or circle.
<ul type = disc>
Type = 1/A/a/i/I
Start = value
In ordered list, it specifies the style of number. 1 stands for
arabic number(1,2,3…) , A stands for capital alphabet
(A,B,C…), a stands for small alphabet(a,b,c…), i stands for
small roman numerals (i,ii…) and I stands for capital roman
numerals (I,II…)
It is used to reset the sequence number of the list.
<ol type = I start = 3>
Examples:
Try it :
<html>
<head>
<title>
HTML
</title>
Welcome to HTML programming
</head>
<body bgcolor = green text = red topmargin = 20 leftmargin = 10>
<comment > Unordered list</comment
<ul type = disc>
<lh> list heading</lh>
<li> One</li>
<li> Two</li>
<li> Three</li>
</ul>
<comment> Ordered List</comment>
<ol type = I start = 3>
<lh>ordered list</lh>
<li> One</li>
<li> Two</li>
<li> Three</li>
</ol>
<!—Definition list
<dl>
<dt> input device</dt>
<dd>it is used to enter data</dd>
<dt> output device</dt>
<dd> it is used to display data</dd>
</dl>
</body>
</html>
Style Tags
Font Style Html Tag
Bold <B>…</B>
Italic <I>…</I>
Underline <U>…</U>
Strikeout <Strike> …</Strike> or <S>…</S>
Big <BIG>…</BIG>
Small <SMALL>…</SMALL>
Teletype <TT>…</TT>

More Related Content

DOCX
PPTX
HTML
PDF
Html xhtml tag-sheet
DOC
Html introduction
PPTX
Html Workshop
PPTX
Html formatting
PPTX
The Complete HTML
PPTX
Web Application and HTML Summary
HTML
Html xhtml tag-sheet
Html introduction
Html Workshop
Html formatting
The Complete HTML
Web Application and HTML Summary

What's hot (13)

PPTX
Html basic
PDF
PPTX
Html ppt
PPTX
Html Tutorial
PPTX
Elements of html powerpoint
PDF
Session4
PPTX
HTML Basic Tags
PPTX
Lectuer html1
PPT
Diva
PDF
Html basics
PDF
Html basics
Html basic
Html ppt
Html Tutorial
Elements of html powerpoint
Session4
HTML Basic Tags
Lectuer html1
Diva
Html basics
Html basics
Ad

Viewers also liked (20)

PPTX
html5.ppt
PPT
Introduction to HTML
PPT
Введение в веб-проектирование
PDF
Uwe usability evaluation
PDF
CSS Lessons Learned the Hard Way (Generate Conf)
PPTX
6. таблицы и другие теги html
PDF
Пингвины из калининграда
PDF
Show vs. Tell in UX Design (Front in Amsterdam)
PPT
Верстка_Лекция1
PDF
Using Flexbox Today (Generate Sydney 2016)
PPT
Box Model
PDF
Organisation and navigation
PPT
Css part2
PPTX
WordPress as Rapid Prototyping Tool
PDF
FL Blog Con 2015: How To Find The Best WordPress Plugins For You
PPT
Php Security
PPTX
Bdd and dsl как способ построения коммуникации на проекте
PPTX
Images and Tables in HTML
PDF
CSS Lessons Learned the Hard Way (ConvergeSE)
PPT
Таблицы Html
html5.ppt
Introduction to HTML
Введение в веб-проектирование
Uwe usability evaluation
CSS Lessons Learned the Hard Way (Generate Conf)
6. таблицы и другие теги html
Пингвины из калининграда
Show vs. Tell in UX Design (Front in Amsterdam)
Верстка_Лекция1
Using Flexbox Today (Generate Sydney 2016)
Box Model
Organisation and navigation
Css part2
WordPress as Rapid Prototyping Tool
FL Blog Con 2015: How To Find The Best WordPress Plugins For You
Php Security
Bdd and dsl как способ построения коммуникации на проекте
Images and Tables in HTML
CSS Lessons Learned the Hard Way (ConvergeSE)
Таблицы Html
Ad

Similar to Html (20)

PPTX
HTML.pptx
PPTX
Week-1_PPT_WEBAPPS-done.pptx
PDF
HTML.pdf
PPSX
Computer language - HTML tags
PPT
introduction to html.ppt
PPT
introdution-to-html.ppt
PPTX
001-Hyper-Text-Markup-Language-Lesson.pptx
DOCX
PPT
Internship HTML_Day-1 for beggineers.ppt
PDF
Title, heading and paragraph tags
PPTX
introduction to html and css for beginners
PPTX
Advance HTML
PPTX
html.pptx class notes to prepare html completly
PDF
HSC INFORMATION TECHNOLOGY CHAPTER 1 ADVANCED WEB DESIGNING PART I.pdf
PPTX
html (1) (1).pptx for all students to learn
DOC
Html, xml and java script
PPT
introduction-to-html hyper text markup .ppt
PPT
introdution-to-html about html basics tags
PPT
introdution-to-Basics_of_Hypertext_Markup_Language
PPT
introdution-to-html-basic webdevelopment.ppt
HTML.pptx
Week-1_PPT_WEBAPPS-done.pptx
HTML.pdf
Computer language - HTML tags
introduction to html.ppt
introdution-to-html.ppt
001-Hyper-Text-Markup-Language-Lesson.pptx
Internship HTML_Day-1 for beggineers.ppt
Title, heading and paragraph tags
introduction to html and css for beginners
Advance HTML
html.pptx class notes to prepare html completly
HSC INFORMATION TECHNOLOGY CHAPTER 1 ADVANCED WEB DESIGNING PART I.pdf
html (1) (1).pptx for all students to learn
Html, xml and java script
introduction-to-html hyper text markup .ppt
introdution-to-html about html basics tags
introdution-to-Basics_of_Hypertext_Markup_Language
introdution-to-html-basic webdevelopment.ppt

Recently uploaded (20)

PPTX
master seminar digital applications in india
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PPTX
PPH.pptx obstetrics and gynecology in nursing
PPTX
Pharma ospi slides which help in ospi learning
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
Cell Types and Its function , kingdom of life
PDF
TR - Agricultural Crops Production NC III.pdf
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
Institutional Correction lecture only . . .
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
master seminar digital applications in india
Renaissance Architecture: A Journey from Faith to Humanism
PPH.pptx obstetrics and gynecology in nursing
Pharma ospi slides which help in ospi learning
Abdominal Access Techniques with Prof. Dr. R K Mishra
Cell Types and Its function , kingdom of life
TR - Agricultural Crops Production NC III.pdf
Pharmacology of Heart Failure /Pharmacotherapy of CHF
STATICS OF THE RIGID BODIES Hibbelers.pdf
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
Anesthesia in Laparoscopic Surgery in India
O7-L3 Supply Chain Operations - ICLT Program
Institutional Correction lecture only . . .
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Final Presentation General Medicine 03-08-2024.pptx
2.FourierTransform-ShortQuestionswithAnswers.pdf
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx

Html

  • 2. HTML And Its Capabilities • It is a document-layout and hyperlink- specification language • It tells the browser how to display the contents of a hypertext document. • It is neither a word processing tool nor a DTP tool ; not even a programming language. It is just a page-layout and hyperlink specification language.
  • 3. HTML • The instructions are not compiled by a traditional compiler but by a WWW browser. • It stands for Hyper Text MarkUp Language. • It is a language that supports multimedia and new page layout features. • Def: It is a simple web page layout language used to design web pages.
  • 4. Software for HTML coding • Text Editor like 1. Notepad 2. Wordpad • HTML file Extension Files can be saved with .htm or .html extension.
  • 5. HTML Documents • HTML is made up of elements or tags and attributes which work together to identify document parts and tell browsers how to display them. • The elements are arranged into sections according to where the elements can be used .
  • 6. Group of Elements • The HEAD Elements – Only elements that are allowed in HEAD section of the documents like Title element. • The BODY Elements – Only elements that are allowed in the BODY section of the document. In this section , elements are broken into groups like Font element, P element.
  • 7. Naming Convention • All elements are enclosed in < > brackets. • The element names are not case sensitive.
  • 8. Tags and Attributes • Tags : It is a coded HTML command that indicates how part of web page should be displayed ex: <Title> • Attributes : It is a special word used inside tag to specify additional information to tag such as color, alignment.
  • 9. Two Categories of Tags • Container Tag: This type of HTML elements require pair tags i.e. a starting as well as ending tag eg : <Title>… </Title>. • Empty Tag : This type of HTML elements require just a starting tag and not an ending tag eg : <BR>, <IMG>,<HR>
  • 10. HTML Document Structure • <HTML> <HEAD> <TITLE> ……..</TITLE> </HEAD> <BODY>…. ….. Body Section(Compulsory Part) </BODY> </HTML> Head Section (Optional Part)
  • 11. HTML Tags • <HTML> It encloses the entire HTML document. It is a container tag. • <HEAD> It encloses the head section of the document. It is a container tag. The title is always in the head section. It is optional.
  • 12. Head Section This section consists of Head Element ,Title tag , meta tag , BASE tag. <head> and <title> tags are strongly recommended tags. Starting Tag Description Closing Tag <head> It begins head section of HTML document and used to display header of the document. </head> <title> It is a parameter tag of <head>. It contains information that display in title bar of web browser </title> Try it : Open Notepad, write the following code: <html> <head> <title> HTML </title> Welcome to HTML programming </head> </html> Save it as first.html then open it in Internet Explorer , see the output
  • 13. Title of the web page Path and file name Header of the document
  • 14. Body Section Tag Description Example <Body> Body of web document </Body> It contains all the contents of a document and also various parameter tags. Attributes of body tag Its attributes value is applicable to whole document. Bgcolor = color-name Used to set background color of web page. Default background color is White. <body bgcolor = green> Background = “Path” Used to insert an image in the background of web page. <body background = “D:im1.jpg”> Text = color-name Used to set foreground or text color of web page. Default text color is Black. <body text = red> Link = color- name Used to set color of unvisited link. Default color is blue. <body link = teal> Alink = color – name Used to set color of active link. Default color is red. <body alink = maroon> Vlink = color –name Used to set color of visited link. Default color is purple. <body vlink = yellow>
  • 15. Tag Description Example Topmargin = n Where n is a number It specify the distance between the top of the document and the top of the browser window. <body topmargin = 10> Leftmargin = n where n is a number It specify the distance between the left side of the document and the left edge of the browser window. <body leftmargin = 20> Body Section contd… Try it <html> <head> <title> HTML </title> Welcome to HTML programming </head> <body bgcolor = green text = red topmargin = 20 leftmargin = 10> This is a demo program. </body> </html> Save it as second.html then open it in Internet Explorer , see the output
  • 16. <Body bgcolor = green topmargin = 20 leftmargin = 10> <body text = red>
  • 17. Font Tag and Basefont Tag Tag Description Example <Font>… </Font> <basefont>…</basefont> It is used to give specification of the size, color and typeface of the enclosed text. It is used to give specification of the size, color and typeface of the enclosed text. It occurs only once in a web document. Attributes of font tag Its attributes value is applicable to portion of document enclosed between <font> and </font>. face = typeface Used to set typeface of enclosed text of web page. <font face = “arial”> size = n Used to set the relative size of the text. The default value is 3. The valid value ranges from 1-7 where 1 is the smallest and 7 is the largest. <font size = “5”> color= color-name Used to set text color of web page. Default text color is Black. <font color =teal> Try it <html> <head> <title> HTML </title> Welcome to HTML programming </head> <body bgcolor = green text = red topmargin = 20 leftmargin = 10> This is a demo program. <font face = “arial” size = 5 color =orange> D</font>emonstrate </body> </html> Save it as third.html then open it in Internet Explorer , see the output Note:Try basefont tag in same example
  • 18. <font face = Arial size = 5 color = orange>
  • 19. Center Tag Tag Description Example <center>…</center> It is used to center the content between the current left and right margins.It is used to center text, image or any other embedded object. Try it <html> <head> <title> HTML </title> Welcome to HTML programming </head> <body bgcolor = green text = red topmargin = 20 leftmargin = 10> This is a demo program. <center><font face = “arial” size = 5 color =orange> D</font>emonstrate</center> </body> </html> Save it as four.html then open it in Internet Explorer , see the output
  • 20. BR Tag Tag Description Example <br> It stands for Break and it is an empty element. It is used to insert single carriage return in a web document Try it <html> <head> <title> HTML </title> Welcome to HTML programming </head> <body bgcolor = green text = red topmargin = 20 leftmargin = 10> This<br> is a demo<br> program.<br> <center><font face = “arial” size = 5 color =orange> D</font>emonstrate</center> </body> </html> Save it as five.html then open it in Internet Explorer , see the output
  • 21. HR Tag Tag Description Example <hr> It stands for Horizontal Rule and it is an empty element. It is used to insert horizontal line for dividing information or section Attributes of <HR> size It indicates thickness of the lines in pixels. Default is 2 pixels. <hr size = 3> width It defines the horizontal width of the line. Default is page width. It is measure in pixel or can be given in %age of the page width <hr width = 5> align It is used to align line at left, center and right <hr align = center> color It is used to change color of rule <hr color = purple> noshade It is used to display a solid black line that has no shading <hr noshade> Try it <html> <head> <title> HTML </title> Welcome to HTML programming </head> <body bgcolor = green text = red topmargin = 20 leftmargin = 10> This is a demo program. <hr size = 3 width = 50% align = center color = purple > <font size = +5> Use of Horizontal Rule</font> <hr noshade> </body> </html> Save it as six.html then open it in Internet Explorer , see the output
  • 22. Comment Tag Tag Description Example <comment>…</comment> <!--- comment - It is ignored by web browser. It is used to explain code and also helps in editing code later. It is used to include multiline comment It is used for single line comment. Try it <html> <head> <title> HTML </title> Welcome to HTML programming </head> <body bgcolor = green text = red topmargin = 20 leftmargin = 10><comment> This is a first web program to explain different tags used in HTML</comment> This<br> is a demo<br> program.<br> <center><font face = “arial” size = 5 color =orange> D</font>emonstrate</center> </body> </html> Save it as six.html then open it in Internet Explorer , see the output
  • 23. Paragraph Tag Tag Description Example <p>…</p> It stands for Paragraph. It is used to insert a line break with extra space in the beginning and for dividing HTML document in paragraphs. <p>hello friend</p> Attributes <p> has only one attribute that is align Align = left|center|right This attribute is used to align paragraph left, center or right.. Default alignment is left. <p align = right>…</p> Try it <html> <head> <title> HTML </title> Welcome to HTML programming </head> <body bgcolor = green text = red topmargin = 20 leftmargin = 10> <p align = center><Hr>Use of paragraph tag</hr></p> <p> It is used to divide HTML document in paragraphs</p> </body> </html> Save it as seven.html then open it in Internet Explorer , see the output
  • 24. Heading Tag Tag Description Example <Hn>…</Hn> where n is from 1 to 6 It stands for Heading. It defines six levels of headings. It is used to give document heading or section heading . H1 is the biggest heading and H6 is the smallest one Attributes <Hn> has only one attribute that is align Align = left|center|right This attribute is used to align paragraph left, center or right.. Default alignment is left. <H1 align = right>…</H1> Try it <html> <head> <title> HTML </title> Welcome to HTML programming </head> <body bgcolor = green text = red topmargin = 20 leftmargin = 10> <p align = center><Hr><h1>Use of paragraph tag</h1></hr></p> <p> It is used to divide HTML document in paragraphs</p> </body> </html> Save it as eight.html then open it in Internet Explorer , see the output
  • 25. Tag Description Attributes <UL>…</UL> <OL>…</OL> <DL>…</DL> It stands for Unordered List. Also known as Bulleted List or Unnumbered List It stands for Ordered List.. Also known as Numbered List. It stands for Definition List. Type Type and Start. <LH> <LI> <DT> and <DD> It stands for list header . It identify list header . It is used with Ordered & Unordered List . It is used just after <OL> and <UL>. It stands for list item. It identify the items of the list . It is used with Ordered & Unordered List . It is used just after <OL> and <UL>. & list Item used with Ordered and Unordered list. It stands for definition term and data definition used with Definition List Using Lists In HTML To display list item in your document ,HTML provides several ways to display a list of items. Attributes Explanation Example Type= disc/square/circle In unordered list , it specifies the bullet style to use. The style can be a disc, square or circle. <ul type = disc> Type = 1/A/a/i/I Start = value In ordered list, it specifies the style of number. 1 stands for arabic number(1,2,3…) , A stands for capital alphabet (A,B,C…), a stands for small alphabet(a,b,c…), i stands for small roman numerals (i,ii…) and I stands for capital roman numerals (I,II…) It is used to reset the sequence number of the list. <ol type = I start = 3>
  • 26. Examples: Try it : <html> <head> <title> HTML </title> Welcome to HTML programming </head> <body bgcolor = green text = red topmargin = 20 leftmargin = 10> <comment > Unordered list</comment <ul type = disc> <lh> list heading</lh> <li> One</li> <li> Two</li> <li> Three</li> </ul> <comment> Ordered List</comment> <ol type = I start = 3> <lh>ordered list</lh> <li> One</li> <li> Two</li> <li> Three</li> </ol> <!—Definition list <dl> <dt> input device</dt> <dd>it is used to enter data</dd> <dt> output device</dt> <dd> it is used to display data</dd> </dl> </body> </html>
  • 27. Style Tags Font Style Html Tag Bold <B>…</B> Italic <I>…</I> Underline <U>…</U> Strikeout <Strike> …</Strike> or <S>…</S> Big <BIG>…</BIG> Small <SMALL>…</SMALL> Teletype <TT>…</TT>