HTML-Slide-Presentation
HTML-Slide-Presentation
Types of html
Unpaired Tags
Body Tag acts as a container for the body and the document.
It appears after the head tag. This tag also sets various color
settings and background characteristics of the document.
Attributes:
Bgcolor - To insert background color. Hexadecimal values
can also be given.
Background – To insert a background image. HTML
supports .jpg and .gif files.
Text – To change the color of the text
Example - bgcolor:
<html>
<head>
<title>Example for Body Tag</title>
</head>
<body bgcolor = “cyan”>
</body>
</html>
Output
Example - bgcolor:
<html>
<head>
<title>Example for Body Tag</title>
</head>
<body bgcolor = “#DDFGHA”>
</body>
</html>
Output
Example - background:
<html>
<head>
<title>Example for Body Tag</title>
</head>
<body background = “flower.jpg”>
</body>
</html>
Output
HEADING TAGS
Specifies headings in a document. Headings are numbered 1 to 6
with <h1> representing the heading for the main heading in the
document and <h3> representing a heading for a nested
subtopic. Generally, text inside heading tags appear in bold face
and may be larger than normal document text.
Example:
<html>
<body bgcolor = "cyan“ text=teal>
<h1>Computer Software College</h1>
<h2>Anna Nagar</h2>
<h3>Chennai</h3>
<h4>TamilNadu</h4>
<h5>Asia</h5>
<h6>India</h6 Output
</body>
</html>
ATTRIBUTE INFORMATION IN HEADING TAG
Align – Positions the heading in the left, right or center of a
document. Style – Specifies style sheet commands that apply
to the heading
Example:
<html>
<body bgcolor = “cyan” text=red>
<h1 align=“center” style=“background:pink”>Computer
Software College</h1>
<h2 align=“right”>Anna Nagar</h2>
<h3 align=“left”>Chennai</h3>
<h4>TamilNadu</h4>
<h5>Asia</h5>
<h6>India</h6 Output
</body>
</html>
FORMATTING TAGS
Bold tag <b> indicates text that should appear in bold face.
Italic tag<i> - Italicizes text.
Underline tag <u> - Underlines text in a document.
Strong tag – Indicates strong emphasis. The browser will
probably display the text in a boldface font.
Strike, s tag – Indicates a strikethrough text style.
Del tag –Indicates text marked for deletion in the document.
Br tag – Breaks a line of continuous text and prevents text
alignment around images.
Example:
<html>
<body bgcolor = "pink" text="blue">
<b>Computer</b>
<br>
<i>Software</i>
<br>
<u>College</u>
<br>
<strong>School</strong>
<br>
<strike>Chennai</strike>
<br>
<s>Calcutta</s>
Output
<br>
<del>Mumbai</del>
<br>
</body>
</html>
FORMATTING TAGS
Cite tag – Provides an in-text citation of a proper title such as the
title of a book. Most browsers display the text inside the <cite>
tag in italics.
Kbd tag – This tag is used to display computer commands and
arguments, especially those to be entered by the user. The text
tagged by <kbd> is usually shown in fixed-width font.
Tt tag – Tele typewriting tag – Puts text in a tele type font.
Em tag – Emphasizes text. Makes the text stand out. Browsers
usually do this with italic or bold face.
Address tag – In a document, distinguishes an address from
normal document text. This tag can be used to specify the name,
e-mail address, phone number, mailing address or other relevant
information.
Example:
<html>
<body bgcolor = “aquamarine" text= brightgold>
<cite>Visual Basic</cite>
<br>
<kbd>Ctrl + S</kbd> to save your document
<br>
<tt>HTML</tt>
<br>
<em>Markup Language</em>
<br>
<address>AD 5/2 II Avenue,Anna Nagar</address>
</body>
</html> Output
FORMATTING TAGS
Font – Alters or sets font characteristics of the font the
browser uses to display text.
Base font – Provides a font setting for normal text within a
document.
Attributes:
Color: Indicates the color the browser uses to display text.
Color names can substitute for the RGB hexadecimal
values.
Face: Specifies a comma-separated list of font names the
browser uses to render text. If the browser does not have
access to the first named font, it tries the second, then the
third and so forth.
Size: Specifies the size of the text affected by the font tag.
We can specify the size in the range 1 through 7.
Example:
<html>
<body bgcolor = "gray">
<font face = "Arial","Times New Roman", size = 6
color = Coral>COMPUTER SOFTWARE COLLEGE
</font>
<br>
<br>
<basefont face = "MsSansSerif" size = 7 color =
Cornflowerblue>MULTIMEDIA</basefont>
<br>
<font face = "Arial" size = 7
onmouseover="this.color='yellow'";
onmouseout="this.color='orange'";>COMPUTERS</font>
</body>
</html> Output
FORMATTING TAGS
Attribute:
1. Style – Specifies style sheet commands that apply to the list
item.
<html>
<body bgcolor = Cadet blue>
<h2>Branches of CSC</h2>
<ol>
<li style="background:wheat">T.Nagar
<li type = 1>Anna Nagar
<li value=5>Ambattur
<li title = "List Item">Mylapore
</ol>
</body>
</html>
Output
UNORDERED LIST
Attribute:
<html>
<body bgcolor = gold>
<h2>Example for Definition List</h2>
<dl>
<dt>HTML
<dd style = "background:blue;color:white">Hyper Text
Markup Language
<dt>XML
<dd title = "Definition">Extensible Markup Language
<dt>SGML
<dd>Standard Generalised Markup Languages
</dl>
</body> Output
</html>
MARQUEE TAG
Displays a scrolling text message within a document. Only
Internet Explorer recognizes this tag.
Attributes:
1. Height – Specifies the vertical dimension of the marquee.
2. Behavior – Indicates the type of scrolling.
a. Scroll – Scrolls text from one side of the marquee,
across, and off the opposite side.
b. Slide – Scrolls text from one side of the marquee,
across, and stops when the text reaches the opposite side.
c. Alternate – Bounces the marquee text from one side to
the other.
3. Bgcolor –Specifies the background color of the marquee.
4. Direction – Indicates the direction in which the marquee text
scrolls. (Left, Right, Top, Bottom)
5. Width – Specifies the horizontal dimension (in pixels) of the
marquee.
Attributes (Contd):
<html>
<body bgcolor = "yellow" text="red">
<marquee>Computer Software College</marquee>
<br>
<font face ="Arial" size = 6 color = "green"><marquee bgcolor
= "lime">CSC Welcomes you</marquee></font>
<br>
<br>
<marquee direction = "right">Welcome To the World of
Computers</marquee>
<br>
<marquee direction = "left">Hello World</marquee>
</body>
</html> Output
Example:
<html>
<body bgcolor = goldenrod>
<h2>Example for Marquee</h2>
<br><marquee direction = "up">CSC - Boon for Middle
Class</marquee><br>
<marquee direction = "down">Computers - A must for Today's
World</marquee><br>
<marquee behavior = "slide">.Net has been introduced in
CSC</marquee><br>
<marquee behavior = "scroll">J2EE is an Advanced
Java Course</marquee><br>
<marquee behavior = "alternate">CSC - Best Software
Training Centre</marquee>
</body>
</html> Output
Example:
<html>
<body bgcolor = "green copper">
<h2>Example for Marquee Tag</h2>
<marquee loop=3 behavior="alternate">CSC - Boon for
Middle Class</marquee><br>
<marquee scrollamount=100 scrolldelay=1000>CSC - To
study Computers is an Economical Way</marquee>
<br>
<marquee><img src = "c:\html\flower.jpg" height=100
width=100></marquee>
<br>
<marquee height=50 width=300>Tally - Accounting
Software</marquee>
</body> Output
</html>
PARAGRAPH AND PREFORMATTED TAG
<html>
<body bgcolor = "hunter green" link="blue"
alink=“yellow" vlink="red">
<a href = "c:\html\third.html"
style="background:pink" target=_new>CLICK HERE TO
GO TO FIRST PAGE</a>
</body> Output
</html>
Notes:-
alink stands for activelink i.e while clicking the color is
displayed
Vlink stands for visited link-after clicking the color is
displayed
Link is used to display the color before clicking the link.
LINKS WITHIN THE SAME PAGE
Example:
<html>
<head>
<title>Example for Link</title>
</head>
<body bgcolor = "lightgreen" link="red" alink="blue"
vlink="yellow">
<a name = "first">
<h1>This is the first Paragraph</h1>
<pre style="font-size:70">
Navigate a document with the Document Map
Document headings must be formatted with built-in
heading styles in order to display in the Document Map.
On the View menu, click Document Map.
Select the level of headings to display. Do any of the following:
Example (Contd):
<html>
<frameset cols = "40%,30%">
<frame src = "c:\html\form.html" name="frame" Output
marginheight=5 marginwidth=10 noresize>
<frame src = "c:\html\marquee.html" scrolling="yes">
</html>
Example 2:
<html>
<frameset rows = "40%,*" framespacing=30>
<frame src = "c:\html\link.html" scrolling="yes">
<frame src = "c:\html\link1.html" scrolling="no">
</html>
Output
Example 3:
<html>
<frameset rows = "20%,50%" border=30
bordercolor="green">
<!--
frameset rows = "40%,*"
-->
<frame src = "c:\html\form.html" scrolling="yes">
<frame src = "c:\html\marquee.html" scrolling="no">
</html>
Output
TABLE TAG
Table - <Table> - Specifies a container for a table within our
document. Inside these tags we can place <TR>,<TD>,<TH>
and <CAPTION> tags.
Attributes:
1. Align = Left,Centre,Right – Positions the table flush left,
flush right or in the center of the window.
2. Background – Specifies the relative or absolute location of a
graphic image file loaded as a background image for the
entire table.
3. Bgcolor – Specifies the background color within all table cells
in the table.
4. Border – Specifies the thickness of borders around each table
cell.
5. Bordercolor – Specifies the color of the borders of all the
Attributes (Contd):
6. Bordercolordark – Specifies the darker color used to draw 3-
D borders around the table cells.
7. Bordercolorlight – Specifies the lighter color used to draw 3-
D borders around the table cells.
8. CellPadding – Specifies the space between the edges of the
table cells and their contents.
9. Cellspacing – Specifies the space between the borders of table
cells and the borders of adjacent cells.
10. Cols – Specifies the number of columns in the table.
11. Frame – Specifies the external border lines around the table.
For the frame=attribute to work, set the border=attribute with
a non-zero value. (Void, Above, Below, Hsides, Vsides, Lhs, Rhs,
Box)
12. Rules – Specifies where rule lines appear inside the table.
(None, All, rows, Cols).
TABLE ROW,TABLE HEADING,TABLE DATA TAGS
<html>
<body bgcolor = "deepskyblue">
<img src = "c:\html\flower3.jpg" height=200
width=200 border=10 alt=“Picture of a Flower”>
<br>
<br>
<img dynsrc = "c:\html\clock.avi" loop=3>
<br>
<br>
<img ismap src = "c:\html\flower2.jpg" height=150
width=150 vspace=100 hspace=50 name=“img”>
</body>
</html> Output
Example 2:
<html>
<body bgcolor = "lavender">
<p>
<img src = "c:\html\tree.jpg" height=300 width=300
align="right">
Internet Explorer makes it easier to get the most
from the World Wide Web, whether you are searching
for new information or browsing your favorite Web
sites. Built-in IntelliSense technology can save you
time completing routine Web tasks, such as
automatically completing Web addresses and forms for
you, and automatically detecting your network and
connection status.
</p>
</body> Output
</html>
BGSOUND TAG – TO INSERT AUDIO
<bgsound> - Embeds a background sound file within
documents.
Attributes:
1. Loop – Specifies the number of times a background sound
file repeats. The value infinite is the default.
2. Src – Indicates the explicit or relative location of the sound
file.
Example:
<html>
<body bgcolor = "Olive">
<bgsound src = "barbie.mp3" loop=10>
</body>
</html> Output
MAP & AREA TAG
Map <map> - Specifies a container for client-side image map data.
Inside the <map> container, we place instances of the <area> tag.
Attributes:
1. Name – Establishes a name for the map information we can later
reference by the usemap=attribute of the <img> tag.
Area <area> - Defines an area withina client side image map
definition. It indicates an area where visitors can choose to link to
another document. Attributes:
1. Coords – Identifies the coordinates within an image map that
define the image map area.
2. Href – Identifies the location of the document we want to load
when the indicated image map area is selected.
3. Shape – Specifies the type of shape used to represent the image
map area. ( Rect, Circle, Poly)
Example:
<html>
<map name = "map2">
<img src = “c:\html\flower.jpg" usemap = #map2>
<area shape = "circle" coords="24,45,67,78"
href=“form.html">
<area shape = "rect" coords = "167,278,295,320"
href=“table.html">
<area shape = "poly" coords = "256,267,278,289,298,245"
href=“marquee.html">
</map>
</html>
Output
Hint: In the Browser use the Tab
Key to view the shapes.
IFRAME TAG
Iframe – Creates floating frames within a document. Floating
frames differ from normal frames because they are
independently manipulable elements within another HTML
document.
Attributes:
1. Align
2. Border, Bordercolor
3. Framespacing
4. Height, Hspace
5. Width, Vspace
6. Margin Height, Margin Width
7. Noresize, Name, Scrolling, Src
Example:
<html>
<body bgcolor = “Teal">
<iframe src="img.html" hspace=100 vspace=100
border=5 bordercolor="Lawngreen">
</iframe>
<br>
<iframe scrolling = "yes" name = "f1" src =
"map.html" align="center">
</iframe>
<br><br>
<iframe name = "f2" frameborder="15" height=350
width=300 src= "img2.html">
</iframe>
</body> Output
</html>
HR TAG – Horizontal Ruler
<hr> - Draws horizontal lines (rules) in our document. This
is useful for visually separating document sections.
Attributes:
1. Align – Positions the line flush left, flush right or in the
center of the document. These settings are irrelevant
unless we use the width=attribute to make the line shorter
than the width of the document.
2. Color – Specifies the color of the line.
3. Noshade – Specifies that the browser not shade the line.
4. Size – Specifies the thickness of the line.
5. Width – Specifies the length of the line.
6. Style – Specifies style sheet commands that apply to the
horizontal line.
Example:
<html>
<body bgcolor = "violet">
<hr color = "darkseagreen">
<hr size=30 color="yellow">
<hr width =50% color="orange">
<hr color="darkorchid" width="30%" align="right">
<hr color = "snow" noshade>
<hr style="color:indigo" width="60%">
</body>
</html> Output
MENU AND LISTING TAG
Menu – Defines a Menu List. Use the <LI> tag to indicate list items.
Listing – Specifies preformatted text to include within a document
Example:
<html>
<body bgcolor = "dimgray" text ="cornflowerblue">
<h2>Countries of Asia</h2>
<menu>
<li>India
<li>Bhutan
<li>SriLanka
<li>Bangladesh</menu><listing>
-------------------
SNO NAME
-------------------
11 Abirami Output
33 Priya
-------------------</listing></body></html>
STANDARD HTML CHARACTERS
<html>
<body bgcolor=“firewall”>
<center>
<h2>Character Entities</h2></center>
><br><<br>"<br>×<br>÷<br>&
<br>♥<br>♦<br>♠<br>♣<br>
£<br>¢<br>©<br>®<br>™<br>
¥<br>α<br>β<br>⇒<br>⇐<br>
∑<br>≤<br>≥<br>π<br>
</body>
</html>
Output