HTML - Lab Manual
HTML - Lab Manual
Course Objectives:
This course aims to provide the skills of Designing and implementation of web based applications. It includes
Basic and advanced Internet programming and their implementation in html, Java scripts and VB scripts & active
server pages, design & implementation of commercial web pages, design & management of electronic commerce
related objectives, PHP technology basics and intermediate level, frameworks using PHP or any other
technology.
Course Outline:
Introduction to Internet Programming: Client Server model, Web Browsers, HTTP
Basic HTML: headers, body, basic html tags, tables, Unordered and Ordered Lists
HTML Form Processing: Building a form, Text fields and value, size, maxlength, html buttons, radio,
checkboxes, prechecked, Selection lists Action and Method - GET and POST.
Client Side Scripting Languages: Basics of JavaScript and VBScript
Web Servers: Introduction to some popular Web Servers (Apache, IIS, etc)
CGI: Introduction to CGI scripting, html form interface with CGI scripts, automating processing such as info forms
and email, Programming CGI interfacing via forms.
Server Side Scripting Engines: Introduction to Active Server Pages and Java Server Pages
Servlets: Introduction to Java Servlets API
PHP intro, forms, database connectivity etc and framework like joomla, drompal etc
File and Database Connectivity
Learning Material/References:
1. Internet & World Wide Web How to Program 3rd Edition) by Harvey M. Deitel, Paul J. Deitel and Andrew
B. Goldberg.
2. Web enabled Commercial Application Development Using…HTML, DHTML,
WEB
Systems [ BSIT P-III First Semester ]
Tag Description
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Title</title>
</head>
<body>
</body>
</html>
Header tags
These tags are all located in the web page header, in other words
between <head> and </head>:
Tag Description
Tag Description
<abbr> Abbreviation
<sup> Exponent
<sub> Index
<audio> Sound
<video> Video
Tag Description
<p> Paragraph
<dfn> Definition
List tags
This section lists all the HTML tags used to create lists (bulleted lists, numbered lists,
definition lists, etc.)
Tag Description
Table tags
Tag Description
<table> Table
<td> Cell
Form tags
Tag Description
<form> Form
Section tags
These tags are used to build the outline of our website.
Tag Description
<header> Header
Generic tags
Generic tags are tags that have no semantic meaning.
Indeed, all other HTML tags have a meaning: <p> means "Paragraph", <h2> means
"Subtitle", etc.
You sometimes need to use generic tags (also called general purpose tags) as
none of the other tags are appropriate. You most often use generic tags to build
your design.
Tag Description
These tags are only useful if you associate them with a class, id or style attribute:
• style:
this attribute allows you to directly specify the CSS code to be applied.
You're not required to have a separate style sheet, you can include the CSS
attributes directly. Note that it's preferable to use an external style sheet
rather than this attribute as it makes your website easier to update later on.
These three attributes are not restricted to generic tags: you can use them with no
problem in most other tags.
Submission Guidelines:
All Students are required to complete the following tasks and then take the Screenshot of
the output form the browser submit. Create a Word File and Paste output of each task on
Word file in sequence.
Practice 1:
1. Print your name in green.
<html>
<body>
<font color="green">John</font>
</body>
</html>
2. Print a paragraph that is a description of a book, include the title of the book as well as its
author. Names and titles should be underlined, adjectives should be italicized and bolded.
<html>
<head> <title> Paragraph Task </title></head>
<body>
<p>
One particular book which is recommended reading is <u>The Street Lawyer</u> by
<u>John Grisham</u>. This book is about a lawyer who begins re-evaluating his
priorities in life when a bad
incident occurs within his law firm. Consequently, he becomes acquainted with the inner
city streets, and realizes the harsh existence of the homeless, and vows to give them a
chance in the courts. <u>The Street Lawyer</u> is a <b><i>great</i></b>
book. It is <b><i>well written</i></b> and <b><i>interesting</i></b>. Other books by
<u>John Grisham</u> include <u>The Firm</u>, <u>The Pelican Brief</u>, and
<u>The Client</u>.
</p>
</body>
</html>
3. Print your name to the screen with every letter being a different heading size
<html>
<head> <title> Name Heading Task </title></head>
<body>
<h4>J</h4>
<h3>o</h3>
<h2>h</h2>
<h1>n</h1>
</body>
</html>
4. Create some links to various search engines (google, yahoo, altavista, lycos, etc). Now Use
Image Icons for each link along with Text
<html>
<body>
<a href="http://www.google.com">
Search the web with Google!
</a>
<a href="http://www.yahoo.com">
Search the web with Yahoo!
</a>
<a href="http://www.bing.com">
Search the web with Bing!
</a>
<a href="http://www.altavista.com">
Search the web with Altavista!
</a>
<a href="http://www.lycos.com">
Search the web with Lycos!
</a>
</body>
</html>
5. Create links to five different pages on five different websites that should all open in a new
window
6. Create a page with a link at the top of it that when clicked will jump all the way to the bottom of
the page.
7. Display an image that has a border of size 2, a width of 200, and a height of 200
8. Display an image that when clicked will link to a search engine of your choice (should be opened
in a new window).
9. Display an image that when clicked will link to itself and will display the image in the browser
by itself.
<html>
<body>
<a href="/images/apple.jpg" target="_top">
<img src="/images/apple.jpg" alt="Apple" />
</a>
<p>
Click on the image to see it in the browser by itself.
</p>
</body>
</html>
10. Display five different images. Skip two lines between each image. Each image should have a
title.
11. Below is a simple table, and the HTML source that created it. Note that tables are normally
colorless unless otherwise specified.
<table>
<tr>
<th>Heading 1</th>
<th>Heading 2</th>
</tr>
<tr>
<td>Data cell 1</td>
<td>Data cell 2</td>
</tr>
<tr>
<td>Data cell 3</td>
<td>Data cell 4</td>
</tr>
</table>
12. Now that you see how a table is built, try making one that looks like the image below. (Note that
the first line is the table's caption.)
13. This exercise will focus on just a few of the more useful properties. In particular, it uses the
colspan, rowspan, height, and width attributes. It also makes use of the bgcolor attribute. The
following example demonstrates the use of these tools.
<table border="1">
<tr>
<td colspan="2" bgcolor="pink">Pink cell</td>
</tr>
<tr>
<td bgcolor="red">Red cell</td>
<td width="100" bgcolor="yellow">Yellow cell</td>
</tr>
</table>
14. Now use the colspan and rowspan attributes to create the table structure as shown in image
below
15 : Here is a sample table created to display a schedule: Notice that it uses many of the attributes,
especially ROWSPAN and COLSPAN. The HTML code that created this table is listed below. If you examine
this code closely, you'll notice that the fourth row (11:00) seems to be missing a few cells. This is because
the third row has two cells with ROWSPAN=2, which means they each automatically take up a cell in the
fourth row as well.
Task 16: create a simple two Colum layout website using Tables. Each link is properly active and
properly managed with content like a website. Sample for two column layout is shown in figure.
Task 17: Create a simple two Colum layout website using Div Tag. Each link is properly active and
properly managed with content like a website. Sample for two column layout is shown in figure
Solution:
<form action="">
<table cellpadding="10">
<tr><td>Color: </td><td><input type="color" name="color" /></td></tr>
Task 19: Create a Simple Website using HTML only as shown in Figure Below.
Task 20:
Create a list of items using ul and li tags .
• Each list item must have Alternative colors for the backgrounds.
• There is space between each item.
Task 21:
Write a program to print a paragraph with different font and color.
Description: Create a webpage to print a paragraph with 4 – 5 sentences. Each sentence should be in a different
font and color.
Hint: Put the paragraph content inside the body tag and paragraph should be enclosed in <p> tag.
<html>
<body>
<p>
<font face="Arial" color="red"> Lorem Ipsum has been the industry's
standard dummy text ever since the 1500s. </font>
Website Project 1:
Create a Web Programming assignment submission Website. With links to each tasks . You can add
colors, images etc.
Task 2: Create a Web page with HTML having following structure and Data. Use Images of your
choice.
Website Project 3:
Create your personal Portfolio/CV website with minimum 6 pages (Home, Biography,
Education, Specialization, Expertise, Hobbies and MyWork). All Pages are Must. Choose any
title for your website but all navigation links should work properly with tabular form galle ries
and user all form tags in contact us for best practice.