2 HTML Assin
2 HTML Assin
</head>
<body>
</body>
</html>
<title> Tag
The <title> element in a document must
occur within the <head> element of the
document and is one of the only elements
permitted to be in the head section.
<title> Roll #14 </title>
It gives title to your document.
<title> Tag
<p> & <br> Tags
For a paragraph break we use tag <P> or <p>.
For a line break we use tag <BR>, <br> or <Br>.
<br> Tag
<pre> Tag
Pre stands for Preformatted. Sometimes you
want to include spaces in your text and you
don’t want your browser to ignore these
spaces. Such spaces are included in the
<pre> </pre> tag.
<pre> Tag
<hn> Tage
It is used to give headings. In the tag <hn> h
stands for the heading where as n can be
replaced with any number between 1-6.
Where <h1> is the largest and <h6> is the
smallest heading size.
<h1>MY PAGE</h1>
<hn> Tag
<hr> Tag
<hr> stands for horizontal row.
Properties:
Size
Width
Color
NOSHADE
<hr> Tag
<B>, <I>, & <U>
<b> </b> Bolds the data
<I> </I> Italicizes the data
<u> </u>Underlines the data
<b><i>&<u> Tag
BGCOLOR
It gives background color to the body. It is a
property of the body tag.
Example:
<body bgcolor=“red” >
</body>
COLORS
Colors can be given by their names like
“green”, “blue”, “cyan” etc.
And also by their hexadecimal notations
like 123ABC, 6789EF etc. One important
thing to notice is that the color in hexa-
decimal notations are also preceded by a ‘#’
sign.
Examples of bgcolor
<body bgcolor=“red”>
<body bgcolor=“#123ABC”>
Some basic colors are:
#FFFFFF ----- White
#000000 ----- Black
#FF0000 ----- Red
#00FF00 ----- Green
#0000FF ----- Blue
Text (color) Property
<body> tag has another property called “text.”
<body text=“red”>
Changes the color of the text, that appears
on the page, to “red.”
Blockquote
The blockquote element is used to denote a
long quotation – one that should be set off
from the surrounding text in the document.
Browsers typically display this type of
quotation as indented text.
<blockquote> </blockquote>
Address Tag
This element is used to hold addresses.
Typically, it occurs at the end of documents
and is used to enclose the author’s name
and electronic mail address. Browsers
usually display addresses in italic style.
<address> Sam Andrew<br>
[email protected] </address>
center Tag
HTML:
<dfn>
HyperText Markup Language
</dfn>
DEL TAG
Its output is similar to that of <s> or
<strike>. It displays your information in
deleted text.
<ul type=“disc”>
<ul type=“square”>
Ordered List
Ordered Lists includes the following:
<OL> means ordered list
<LI> means list
<OL>
<LI>HTML
<LI>DHTML
<LI>XML
<LI>SGML
</OL>
Ordered List 3
Ordered list have an option called “type.” With the
help of this option you can change the appearance
of the bullets that appear on your screen.
Following are the types of bullets available in OL.
1 Arabic Numerals
A Uppercase Letters
a Lowercase Letters
I Large Roman
i Small Romans
Ordered List 4
Apart from type we also have an option
called “start.” Start tells HTML what will
be the initial value where as type tells
HTML what kind of bullet I want to use.
EXAMPLE:
<OL TYPE=1 START=9>
<OL TYPE=a START=9>
<OL TYPE=A START=9>
<OL TYPE=I START=9>
<OL TYPE=i START=9>
Other Approaches
There are two more methods to achieve
unordered list format:
<DIR>
<MENU>
There is no difference in the output.
MENU TAG EXAMPLE
<menu>
<LI>HTML
<LI>DHTML
<LI>XML
<LI>SGML
</menu>
DIR TAG EXAMPLE
<dir>
<LI>HTML
<LI>DHTML
<LI>XML
<LI>SGML
</dir>
<ol> Nested Lists
<li> Paste Tomatoes <li>
<ul>
<li> Banana Legs </li>
<li> Principle Borghese </li>
</ul>
<li> Cherry Tomatoes </li>
<ul>
<li>Gold Nugget</li>
<li>Small Fry</li>
</ul></ol>
<ul>
<li>Level One
<ul>
<li>Level Two
<ul>
<li>Level Three
</ul>
</ul>
</ul>