HTML Basics
HTML Basics
arkup Language)
Client running a
Web Browser
3
Server running
Web Server
Software (IIS,
Apache, etc.)
What is HTML
Hyper Text Markup Language
It is a text file containing small markup tag
s
The markup tags tells the Web browser ho
w to display the page
What is HTML
History of HTML
1992 : HTML 1.0 by Tim Berners-Lee
1994 : HTML 2.0
1996 : HTML 3.2
1997 : HTML 4.0
1999 : HTML 4.01
2008 : HTML 5.0
HTML Syntax
An HTML file contains both formatting ta
gs and content
Document content is what we see on the
webpage.
Tags are the HTML codes that control the
appearance of the document content.
HTML Syntax
HTML syntax:
Closing
tag
two-sided tag:
<tag attributes>document content</tag>
Starting
tag
Properties of the
tag.
Optional!
<html>
.......
</html>
<html>
<head>
<title> CGS 2100 </title>
</head>
</html>
<html>
<head>
<title> CGS 2100 </title>
</head>
The content of
the whole web
page should be
put here
<body>
This is a sample HTML file.
</body>
</html>
Title
Body
sample.html
tag
tag
Hyperlink tags
<html>
<head>
<title> CGS 2100 </title>
</head>
<body>
<p> Here is the first paragraph. </p>
<p> Here is the second paragraph. </p>
</body>
</html>
result
First paragraph
Space between
paragraphs
Second paragraph
List tags
Ordered list: used to display information in a numeric orde
r. The syntax for creating an ordered list is:
<ol >
<li>item1 </li>
<li>item2 </li>
</ol>
Result:
e.g.
<ol >
<li> Name: Your name </li>
<li> Section: ### </li>
<li> Instructor: Yuping </li>
</ol>
List tags
Unordered list: list items are not listed in
</ul>
Result
e.g.
<ul>
<li> Name: Your name </li>
<li> Section: ### </li>
<li> Instructor: Yuping </li>
</ul>
Hyperlink
Link to another location or file
Syntax:
Result:
Ending tag
Link
Link to document
<a href=http://www.eecs.ucf.edu/images/building.jpg>Link</a>
Email link
<a href= mailto:[email protected]> Link to email </a>
Include a Picture
<img src=FILENAME />
<img src=FILENAME alt=text />
E.g.
<img src=logo.gif alt=Google logo />
<img src=logo.gif />
Advantages of HTML
Highly Flexible & Widely used
Supported on every browser
User friendly
Consistent & efficient
Easy to understand & no training required
Easier to maintain & update any site
Disadvantages of HTML
Can create only static and plain pages
Need to write lot of code for making simple
web page
Concerns with security features
Complexity in writing long codes
References
HTML book HTML and XHTML
Various web tutorials
A presentation by