Professional Documents
Culture Documents
Lec 03introduction To HTML
Lec 03introduction To HTML
Lecture 03
LAMP
29th Jan 2008
Story So Far …..
Introduction to Internet & Web basics
• Internet, internet and intranet
• World Wide Web
• Web page
• HTML
• Browsers
• Server-client Architecture
• Server
• Web server
• Scripting
• ASP.NET
12/08/21 2
Story Continues …
HTTP
HTML
HTML Tags
Links
Lists
Tables
12/08/21 3
Acronym #1: HTTP
provides a way for one computer (the browser) to ask a remote computer
(a web server) for an HTML document
12/08/21 4
Acronym #2: HTML
a language for describing the structure and the appearance of web pages
web browsers read HTML and use the mark up tags to decide how to
display it
http://www.w3.org
12/08/21 6
So what’s this tag business?
them
the spacing of text in HTML does not affect the layout of the
12/08/21 7
Check the HTML source!
12/08/21 8
Check the HTML source!
12/08/21 9
Tags
12/08/21 10
The structure of an HTML document
Tag Description
12/08/21 12
Formatting Tags
<B>The Altered Text</B> The Altered Text
12/08/21 13
Formatting Tags (contd..)
<font></font>
• Align
• Size
• Color
Ex:
<font color="#FF0000" align="center" size=“4"> This is my first
page</font>
12/08/21 14
The Most Common Character Entities
Result Description Entity Name Entity Number
12/08/21 15
Links
Anchor tag
Example:
<a href="http://csd"
target="_blank">CSD Rocks!</a>
12/08/21 16
View in Browser
12/08/21 17
Link (Contd…)
Mailto Link
<a href=mailto:subbareddy@bits-pilani.ac.in>subbareddy</a>
12/08/21 18
Body Tags
Attributes
• Link
• Vlink
• Alink
• background
• Ex:
12/08/21 19
Links
LINK is used to indicate relationships between documents
Path :
• Relative
• Absolute
12/08/21 20
Relative Path
FOLDER1
• FOLDER2
file1
• File1
• File2
12/08/21 21
Absolute Path
C Drive
• FOLDER1
FOLDER2
• File1
File1
File2
12/08/21 22
Where to use what ?
Absolute path
• For giving references (links) to other websites
Relative Path:
• For referring to the web pages of the same website.
12/08/21 23
Lists
Unnumbered List
List of Courses :
• ASP.NET
• Computer Programming I
• Computer Programming II
<ul>
<li>ASP.NET</li>
<li>Computer Programming I</li>
<li>Computer Programming II</li>
</ul>
12/08/21 24
Lists (Contd…)
Numbered Lists
List of Courses :
1. ASP.NET
2. Computer Programming I
3. Computer Programming II
<ol>
<li>ASP.NET</li>
<li>Computer Programming I</li>
<li>Computer Programming II</li>
</ol>
12/08/21 25
Nested Lists
<ul>
List of Courses :
<li>ASP.NET</li>
ASP.NET <ul>
<li>C#</li>
• C#
<li>VB.NET</li>
• VB.NET </ul>
<li>Computer Programming
Computer Programming I
I</li>
Computer Programming <li>Computer Programming
II</li>
II
</ul>
12/08/21 26
Tables
Table tags
<table></table>
Rows
<tr></tr>
Columns
<td></td>
12/08/21 27
Table Tags
Tag Description
<table> Defines a table
<th> Defines a table header
<tr> Defines a table row
<td> Defines a table cell
<caption> Defines a table caption
<colgroup> Defines groups of table columns
<col> Defines the attribute values for one or more
columns in a table
<thead> Defines a table head
<tbody> Defines a table body
<tfoot> Defines a table footer
12/08/21 28
ColSpan:
12/08/21 29
Colspan (Contd..)
<table border="1">
<tr>
<td colspan="2"></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
</table>
12/08/21 30
RowSpan
12/08/21 31
RowSpan
<table border="1“ >
<tr>
<td></td>
<td rowspan="2"></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
</table>
12/08/21 32
Comments in HTML
when you want to write something in the HTML source that
doesn't appear in browser
also used to hide JavaScript and CSS
comments start with <!-- and end with -->
<p>
Here is a paragraph of text.
<!-- This is a comment that will not be seen -->
The paragraph has two sentences that’s all.
</p>
12/08/21 33
12/08/21 34