HTML Tutorial
HTML Tutorial
(HTML)
HTML
HTML is the standard language that
the Web uses for creating and
recognizing documents.
HTML
Use of HTML tags and elements
1. control the appearance of the page and
the content.
2. publish online documents and retrieve
online information using the links inserted
in the HTML document.
3. Create on-line forms. These forms can be
used to collect information about the
user, conduct transactions, and so on.
4. Insert objects audio-clips, video clips,
ActiveX components, java applets in the
HTML document.
Md. Shahanur Islam, Lecturer (MIS)
ASAUB
HTML Tags
The HTML commands are called TAGS. The
TAGS are used to control the content and
appearance of the HTML document. The
opening tag is a pair of brackets <>.
This indicates the beginning of the HTML
command. The closing tag is represented
as </> to indicate the end of the HTML
command.
HTML Tags
The HTML tag is used to mark the
beginning and end of an HTML document.
<HTML>
</HTML>
The tags are not case (upper/ lower)
sensitive.
Md. Shahanur Islam, Lecturer (MIS)
ASAUB
to
<HR
EXAMPLE
INCORRECT
<BOD Y>
CORRECT
<BODY>
Browsers
treat
the
first
space
encountered inside an element as the
end of an elements name and the
beginning of its attributes.
Md. Shahanur Islam, Lecturer (MIS)
ASAUB
CORRECT
<B><I>Not correct</B></I>
<B><I>Correct</I></B>
delimits the
of an HTML
the <HEAD>
element. The
for all other
element is
The <BODY>Element
The body of a document is defined by <BODY>
and </BODY> tag.
Only one
document.
<BODY>element
can
appear
per
EFFECT
EFFECT
EFFECT
EFFECT
<html>
<body>
EFFECT
EFFECT
<body bgcolor="yellow">
Department Of Management Information System (MIS)
</body>
</html>
Or
<html>
<body bgcolor="#0000ff">
Department Of Management Information Systems (MIS)
</body>
</html>
EFFECT
<HTML>
<BODY BACKGROUND="final1.BMP">
<P ALIGN="CENTER"><FONT SIZE="15"
COLOR="RED">MANAGEMENT INFORMATION SYSTEM
(MIS)</FONT></P><BR><BR>
<BR>
<P ALIGN="CENTER"><FONT SIZE="6" COLOR="RED">THIS IS
THE EXAMPLE OF BACKGROUND
IMAGE/PICTURE.</FONT></P>
</BODY>
</HTML>
Md. Shahanur Islam, Lecturer (MIS)
ASAUB
EFFECT
EFFECT
EFFECT
EFFECT
000033
000066
000099
0000CC
0000FF
003300
003333
003366
003399
0033CC
0033FF
006600
006633
006666
006699
0066CC
0066FF
009900
009933
009966
009999
0099CC
0099FF
00CC00
00CC33
00CC66
00CC99
00CCCC
00CCFF
00FF00
00FF33
00FF66
00FF99
00FFCC
00FFFF
330000
330033
330066
330099
3300CC
3300FF
333300
333333
333366
333399
3333CC
3333FF
000000
336600
336633
336666
336699
3366CC
3366FF
339900
339933
339966
339999
3399CC
3399FF
33CC00
33CC33
33CC66
33CC99
33CCCC
33CCFF
33FF00
33FF33
33FF66
33FF99
33FFCC
33FFFF
660000
660033
660066
660099
6600CC
6600FF
663300
663333
663366
663399
6633CC
6633FF
666600
666633
666666
666699
6666CC
6666FF
669900
669933
669966
669999
6699CC
6699FF
66CC00
66CC33
66CC66
66CC99
66CCCC
66CCFF
66FF00
66FF33
66FF66
66FF99
66FFCC
66FFFF
990000
990033
990066
990099
9900CC
9900FF
993300
993333
993366
993399
9933CC
9933FF
996600
996633
996666
996699
9966CC
9966FF
999900
999933
999966
999999
9999CC
9999FF
99CC00
99CC33
99CC66
99CC99
99CCCC
99CCFF
99FF00
99FF33
99FF66
99FF99
99FFCC
99FFFF
CC0000
CC0033
CC0066
CC0099
CC00CC
CC00FF
CC3300
CC3333
CC3366
CC3399
CC33CC
CC33FF
CC6600
CC6633
CC6666
CC6699
CC66CC
CC66FF
CC9900
CC9933
CC9966
CC9999
CC99CC
CC99FF
CCCC00
CCCC33
CCCC66
CCCC99
CCCCCC
CCCCFF
CCFF00
CCFF33
CCFF66
CCFF99
CCFFCC
CCFFFF
FF0000
FF0033
FF0066
FF0099
FF00CC
FF00FF
FF3300
FF3333
FF3366
FF3399
FF33CC
FF33FF
FF6600
FF6633
FF6666
FF6699
FF66CC
FF66FF
FF9900
FF9933
FF9966
FF9999
FF99CC
FF99FF
FFCC00
FFCC33
FFCC66
FFCC99
FFCCCC
FFCCFF
FFFF00
FFFF33
FFFF66
FFFF99
FFFFCC
FFFFFF
<hr>
<p>This is a paragraph</p>
<hr>
<p>This is a paragraph</p>
</body>
</html>
EFFECT
<html>
<body>
<pre>
My Bonnie lies over the ocean.
My Bonnie lies over the sea.
My Bonnie lies over the ocean.
Oh, bring back my Bonnie to me.
</pre>
<pre>Note that your browser simply ignores your formatting!</pre>
</body>
</html>
EFFECT
<blockquote>
This is a long quotation. This is a long quotation. This is a long quotation. This is a long
quotation. This is a long quotation.
</blockquote>
</body>
</html>
EFFECT
EFFECT
<a href="university1.html">
<img src="button.bmp" border="0" width="65" height="38">
</a>
</p>
</body>
</html>
EFFECT
<p id=2>
<a href=#1> Go To Top </a>
</body>
</html>
Md. Shahanur Islam, Lecturer (MIS)
ASAUB
EFFECT
TABLE
TABLE NO BORDER
<html>
<body>
<h4>This table has no borders:</h4>
<table>
<tr>
<td>100</td>
<td>200</td>
<td>300</td>
</tr>
<tr>
<td>400</td>
<td>500</td>
<td>600</td>
</tr>
</table>
</body>
</html>
EFFECT
EFFECT
EFFECT
EFFECT
EFFECT
EFFECT
<html>
<body>
Vertical headers
</table>
<h4>Vertical headers:</h4>
<table border="1">
<tr>
<th>First Name:</th>
<td>Bill Gates</td>
</tr>
<tr>
<th>Telephone:</th>
<td>555 77 854</td>
</tr>
<tr>
<th>Telephone:</th>
<td>555 77 855</td>
</tr>
</table>
</body>
</html>
Md. Shahanur Islam, Lecturer (MIS)
ASAUB
EFFECT
EFFECT
Without cellpadding
<html>
<body>
<h4>Without cellpadding:</h4>
<table border="1">
<tr>
<td>First</td>
<td>Row</td>
</tr>
<tr>
<td>Second</td>
<td>Row</td>
</tr>
</table>
</body>
</html>
Md. Shahanur Islam, Lecturer (MIS)
ASAUB
EFFECT
With cellpadding
<html>
<body>
<h4>With cellpadding:</h4>
<table border="1"
cellpadding="10">
<tr>
<td>First</td>
<td>Row</td>
</tr>
<tr>
<td>Second</td>
<td>Row</td>
</tr>
</table>
</body>
</html>
Md. Shahanur Islam, Lecturer (MIS)
ASAUB
EFFECT
CELL SPAN
Cell that spans two columns
<html>
<body>
<h4>Cell that spans two columns:</h4>
<table border="1">
<tr>
<th>Name</th>
<th colspan="2">Telephone</th>
</tr>
<tr>
<td>Bill Gates</td>
<td>555 77 854</td>
<td>555 77 855</td>
</tr>
</table>
</body>
</html>
Md. Shahanur Islam, Lecturer (MIS)
ASAUB
EFFECT
EFFECT
LIST
ORDER LIST
<html>
<body>
<h4>An Ordered List:</h4>
<ol>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
</body>
</html>
EFFECT
UNORDERLIST TAGS
<html>
<body>
<h4>An Unordered List:</h4>
<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
</body>
</html>
EFFECT
DIFFERNENT LIST
<html>
<body>
<h4>Letters list:</h4>
<ol type="A">
<li>Apples</li>
<li>Bananas</li>
<li>Lemons</li>
<li>Oranges</li>
</ol>
<h4>Lowercase letters list:</h4>
<ol type="a">
<li>Apples</li>
<li>Bananas</li>
<li>Lemons</li>
<li>Oranges</li>
</ol>
</body>
</html>
Md. Shahanur Islam, Lecturer (MIS)
ASAUB
EFFECT
DIFFERNENT
<html>
<body>
<h4>Roman numbers list:</h4>
<ol type="I">
<li>Apples</li>
<li>Bananas</li>
<li>Lemons</li>
<li>Oranges</li>
</ol>
LIST
EFFECT
NESTED LIST
<html> <body>
<h4>A nested List:</h4>
<ul>
<li>Coffee</li>
<li>Tea
<ul>
<li>Black tea</li>
<li>Green tea
<ul>
<li>China</li>
<li>Africa</li>
</ul>
</li>
</ul>
</li>
<li>Milk</li>
</ul>
</body> </html>
EFFECT
EFFECT
EFFECT
<html>
<body>
FORM OF HTML
TEXT FIELD
<form>
First name:
<input type="text" >
<br>
Last name:
<input type="text" >
</form>
</body>
</html>
Md. Shahanur Islam, Lecturer (MIS)
ASAUB
EFFECT
EFFECT
EFFECT
RADIO BUTTON
<html>
<body>
<form>
Male:
<input type="radio" checked="checked"
name="Sex" value="male">
<br>
Female:
<input type="radio"
name="Sex" value="female">
</form>
</body>
</html>
Md. Shahanur Islam, Lecturer (MIS)
ASAUB
EFFECT
CHECK BOX
<html>
<body>
<form>
I have a bike:
<input type="checkbox" name="Bike">
<br>
I have a car:
<input type="checkbox" name="Car">
</form>
</body>
</html>
EFFECT
EFFECT
EFFECT
NORMAL BUTTON
<html>
<body>
<form>
<input type="button" value="Hello world!">
</form>
</body>
</html>
EFFECT
HTML BASIC
HTML Basic Document
<html>
<head>
<title>Document name goes here</title>
</head>
<body>
Visible text goes here
</body>
</html>
Heading Elements
<h1>Largest Heading</h1>
<h2> . . . </h2>
<h3> . . . </h3>
<h4> . . . </h4>
<h5> . . . </h5>
<h6>Smallest Heading</h6>
Md. Shahanur Islam, Lecturer (MIS)
ASAUB
Text Elements
<p>This is a paragraph</p>
<br> (line break)
<hr> (horizontal rule)
<pre>This text is preformatted</pre>
Logical Styles
<em>This text is emphasized</em>
<strong>This text is strong</strong>
<code>This is some computer code</code>
Physical Styles
<b>This text is bold</b>
<i>This text is italic</i>
<u>This text is Underline</u>
Md. Shahanur Islam, Lecturer (MIS)
ASAUB
Ordered list
<ol>
<li>First item</li>
<li>Next item</li>
</ol>
Definition list
<dl>
<dt>First term</dt>
<dd>Definition</dd>
<dt>Next term</dt>
<dd>Definition</dd>
</dl>
Md. Shahanur Islam, Lecturer (MIS)
ASAUB
Tables
<table border="1">
<tr>
<th>someheader</th>
<th>someheader</th>
</tr>
<tr>
<td>sometext</td>
<td>sometext</td>
</tr>
</table>
Forms
<form action="http://www.somewhere.com/somepage.asp" method="post/get">
<input type="text" name="lastname" value="Nixon" size="30" maxlength="50">
<input type="password">
<input type="checkbox" checked="checked">
<input type="radio" checked="checked">
<input type="submit">
<input type="reset">
<input type="hidden">
<select>
<option>Apples
<option selected>Bananas
<option>Cherries
</select>
<textarea name="Comment" rows="60" cols="20"></textarea>
</form>
Md. Shahanur Islam, Lecturer (MIS)
ASAUB
Other Elements
<!-- This is a comment -->
<blockquote>
Text quoted from some source.
</blockquote>
<address>
Address 1<br>
Address 2<br>
City<br>
</address>