HTML Introduction - PHP Lecture 2 PDF
HTML Introduction - PHP Lecture 2 PDF
Hypertext
ype e Markup
a up Language
a guage
(HTML)
http://freepdf-books.com
Assignment
g # 1 – Due date 20 April, 2009
2
Question # 1
Q
a) What’s your (most) favorite web site?
How did you find it?
Does it have any flaws?
b) What’s the web site you dislike the most?
From those you need to use
Why do you need to use it?
What can you do to change the site?
What are the good things about this site?
Evaluate both sites based on the prior criteria
criteria.
Question # 2
What different types
yp of websites exists? Explain
p each
category with examples.
http://freepdf-books.com
Overview
3
http://freepdf-books.com
HTML Fundamentals
4
HTML Tags
g
keywords surrounded by angle brackets like <html>
Normally come in pairs like <b> and </b>
The first tag in a pair is the start tag, the second tag is the
end tag
Case insensitive
http://freepdf-books.com
HTML ‐ Fundamentals
5
Open
p tags
g
<name attributes/>
<hr/>, <br/>
<img
i src=“url”
l width=‘100px’
id h 100
height=’60px’/>
Closed tags
g
<name attributes> stuff </name>
<b>text to be bolded</b>
<h1>level
l l1h heading /
d text</h1>
Comments
<!-- comment text -->
http://freepdf-books.com
HTML – Fundamentals
Document Structure
6
Header
Body
< / HTML>
http://freepdf-books.com
HTML – Fundamentals
Basic Structure
7
<html>
<head>
<title> The title of your html page </title>
…
</head>
<body>
</body>
</html>
http://freepdf-books.com
Various HTML Elements
8
http://freepdf-books.com
Writingg and Savingg an HTML File
9
<html>
<head>
/
</head>
<body>
Mike Tyler
PO Box 190387 Output
Hungry Horse, Mt 59919
</body>
</html>
http://freepdf-books.com
HTML ‐ Fundamentals
12
<html>
<head>
</head>
<body>
<h1>Mike Tyler</h1>
PO B
Box 190387<b
190387<br>>
Hungry Horse, Mt 59919<br>
Output
</body>
<html>
http://freepdf-books.com
HTML ‐ Fundamentals
13
<html>
<head>
</head>
<body>
<font face=“Arial" color="red" size="3">
<h1>Mike Tyler</h1>
PO Box 190387<br>
Hungry Horse, Mt 59919<br>
Output
</font>
</body>
<html>
h l
http://freepdf-books.com
HTML ‐ Fundamentals
14
<html>
<head>
</head>
<body>
<p align="center">
<font face="Arial" color="red" size="3">
<h1>Mike Tyler</h1>
PO Box 190387<br> Output
Hungry Horse, Mt 59919<br></font>
</p>
</body>
<html>
http://freepdf-books.com
HTML ‐ Fundamentals
15
<html>
<head>
</head>
<body>
<p align="center">
<font face="Arial" color="red" size="3">
<h1>Mike Tyler</h1>
PO Box 190387<br>
Hungry Horse, Mt 59919<br></font>
<img src="file:///c:/mike.jpg"/>
</p>
</body>
<html> Output
http://freepdf-books.com
HTML ‐ Fundamentals
16
<html>
<head>
h d
</head>
<body>y
<p align="center">
<font face="Arial" color="red" size="3">
<h1>Mike
h1 Mik TTyler</h1>
l /h1
PO Box 190387<br>
g y Horse, Mt 59919<br></font>
Hungry
<img src="file:///c:/mike.jpg"/><br>
<a href=“biopage.html”>Read my Bio</a>
</ >
</p>
</body>
<html> http://freepdf-books.com
HTML ‐ Fundamentals
17
Output
http://freepdf-books.com
Miscellaneous
18
color = “red”
red
color = “#FF0000”
Hexadecimal values vary from 00 to FF
0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f
#FF FF FF
Red Blue
Green
http://freepdf-books.com
HTML – Fundamentals
Headings
20
http://freepdf-books.com
HTML – Fundamentals
Horizontal Lines and Comments
21
Horizontal Line
The <hr /> tag is used to create an horizontal rule (line).
<p>This
p is a p
paragraph</p>
g p /p
<hr>
Comments
Comments are ignored by the browser and are not
displayed.
Make the code readable and understandable
Tag Description
<b>
b D fi
Defines b
bold
ld text
<big> Defines big text
<em> Defines emphasized text
<i>
i D fi
Defines it
italic
li ttextt
<small> Defines small text
<strong> Defines strong text
< b>
<sub> D fi
Defines subscripted
b i t d ttextt
<sup> Defines superscripted text
<ins> Defines inserted text
<d l>
<del> D fi
Defines d
deleted
l t d ttextt
<s> Deprecated. Use <del> instead
<strike> Deprecated. Use <del> instead
<u> Deprecated Use styles instead
Deprecated.
<html>
<body style="background‐color : PowderBlue;">
<h1>Look! Styles and colors</h1>
<p style="font‐family:verdana; color:red">
This text is in Verdana and red</p>
<p style="font‐family:times; color:green">
This text is in Times and green</p>
<p style="font‐size:30px">This text is 30 pixels high</p>
/
</body>
</ht l>
</html>
Web Tech 1. Hypertext Markup Language
http://freepdf-books.com
Hyperlinks:
yp Essence of Hypertext
yp
25
Anchor Tag
<a href=“url”> description </a>
<p>Kalfoglou and Schorlemmer presented
<a href=“http://citeseer.ist.psu.edu/2146170”>
Information Flow based Ontology Mapping</a> at the
International Conference …</p>
http://citeseer.ist.psu.edu/2146170
Web Tech 1. Hypertext Markup Language
http://freepdf-books.com
More about Hyperlinks
yp
26
<ul type=
type=‘disc’>
disc > <ol type=‘i’
type= i start=
start=‘2’>
2>
<li>apples</li> <li>apples</li>
<li>bananas</li> <li>bananas</li>
<li>grapes</li> <li>grapes</li>
<li> t
<li>strawberries</li>
b i </li> <li> t
<li>strawberries</li>
b i </li>
</ul> </ol>
http://freepdf-books.com
HTML – Fundamentals
Lists
28
apples II
II. apples
bananas III. bananas
grapes IV
IV. grapes
strawberries V. strawberries
http://freepdf-books.com
HTML – Fundamentals
Tables
29
<TABLE BORDER=“1”>
<CAPTION ALIGN="bottom">Class Grades</CAPTION>
<TR>
<TH>Student</TH>
<TH>Grade</TH>
</TR>
<TR>
<TD>Tom</TD>
<TD>B+</TD>
</TR>
<TR>
<TD>Sue</TD>
<TD>A‐</TD>
</TR>
</TABLE>
http://freepdf-books.com
HTML – Fundamentals
Tables
30
BORDER=value
ALIGN=left|right|center
CELLSPACING=value
CELLPADDING=value
WIDTH=value|percent
http://freepdf-books.com
HTML – Fundamentals
Tables
31
32
http://freepdf-books.com
HTML – Fundamentals
33
<TABLE BORDER=1 WIDTH="50%" CELLPADDING=5 ALIGN="center">
<TR>
<TD colspan=2 align='center'>
<font color="red"><b>Student Grades</b></font>
</TD>
</TR>
<TR>
<TD><b>Student</b></TD>
<TD><b>Grade</b></TD>
</TR>
<TR>
<TD>Tom</TD>
<TD rowspan=2>A</TD>
</TR>
<TR>
<TD>S </TD>
<TD>Sue</TD>
</TR>
</TABLE>
http://freepdf-books.com
Screen Compatibility
p y
34
1280 x 1024
1024 x 768
800 x 600
640 x 480
http://freepdf-books.com
HTML – Fundamentals
Tables
Tables are frequently used to layout the basic web page design.
1280
640 35
http://freepdf-books.com
Next Class
36
Advance HTML
Forms, Frames, Embedded Objects …
http://freepdf-books.com