Web Tech Lab Manual
Web Tech Lab Manual
Web Tech Lab Manual
1. Make entry in the Log Book as soon as you enter the Laboratory.
2. All the students should sit according to their roll numbers starting
from their left to right.
3. All the students are supposed to enter the terminal number in the
log book.
4. Do not change the terminal on which you are working.
5. All the students are expected to get at least the algorithm of the
program/concept to be implemented.
6. Strictly observe the instructions given by the teacher/Lab
Instructor.
7. Do not disturb machine Hardware / Software Setup.
To develop computer engineers with necessary analytical ability and human values who can
creatively design, implement a wide spectrum of computer systems for welfare of the society.
2. Preparing graduates for higher education and research in computer science and
engineering enabling them to develop systems for society development.
I. To analyze, design and provide optimal solution for Computer Science & Engineering
and multidisciplinary problems.
II. To pursue higher studies and research by applying knowledge of mathematics and
fundamentals of computer science.
III. To exhibit professionalism, communication skills and adapt to current trends by
engaging in lifelong learning.
Programme Outcomes (POs):
Engineering Graduates will be able to:
Tools: Notepad Editor and Web Browser like Internet Explorer or Mozilla Firefox.
THEORY:
1. What is HTML?
A series of tags that are integrated into a text document.
A series of tags that are integrated into a text document.
These look like: <code>formatted text</code> o <code> begins the formatting tag. o
</code> ends the formatting tag.
These tags are then read by a Browser, which translates the tags into the formatting that
they represent
HEAD Tag
<HEAD></HEAD>
These tags are in the beginning of the document. Important information is stored in-
between these tags including: title, meta-data, styles, and programming scripts
TITLE Tag
<TITLE></TITLE>
These tags are in-between the HEAD tags and contain the text that appears in the
title of the Web page.
BODY Tag
<BODY></BODY>
As you may have guessed, the BODY tags contain all the text in the body of the
document.
4. Block Level tags
4.2HTML Paragraphs -
Paragraphs are defined with the<p> tag.
Tag Description
<b> Defines bold Text
CONCLUSIONS:
In this way we can use different basic tags of HTML for creating webpage displaying
information.
2. Lab Exercise
Tools: Notepad Editor and Web Browser like Internet Explorer or Mozilla Firefox.
THEORY:
HTML Tables:
• Tables are defined with the <table> tag.
• A table is divided into rows (with the <tr> tag),
• Each row is divided into data cells (with the <td> tag).
• td stands for "table data," and holds the content of a data cell.
• A <td> tag can contain text, links, images, lists, forms, other tables, etc.
<Caption>Monthly savings</caption>
<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>
<h4>Cell that spans two rows:</h4>
<table border="1">
<tr> <th>First Name:</th>
<td>Bill Gates</td>
</tr>
<tr>
<th rowspan="2">Telephone:</th>
<td>555 77 854</td>
</tr>
<tr>
<td>555 77 855
</td>
</tr>
</table>
</body>
</html>
Output-
CONCLUSIONS:
With the help of given information about the Table and Table tags we can design a
time table in tabular format.
3. Lab Exercise
STANDARD PROCEDURE:
THEORY:
HTML uses the <a> anchor tag to create a link to another document or web page.
• To add a subject for the email message, you would add ?subject= after the email
address. For example:
<a href="mailto:[email protected]?subject=Email Assistance">Email Help
Desk</a>
CONCLUSIONS:
With the help of given procedure and information about the Links we can write
HTML code for creating Hyperlinks in html page.
4. Lab Exercise
Aim: - Create Style sheet to set formatting for text tags and embed
that style sheet on web pages created for your site.
Tools: Notepad Editor and Web Browser like Internet Explorer or Mozilla Firefox.
THEORY:
Types of CSS-
1. Inline CSS
2. Here “Style” Attribute is used.
For Example-
<body style=”background-color: red;”>
2. Internal CSS
Here HTML tag <style> is used.
For
Example-
<html>
<head>
<title>Example</title> <style
type="text/css"> body
{background-color:
#FF0000;} p {background-
color: yellow;}
</style>
</head>
<body>
<p>This is a red page</p>
</body>
</html>
3. External CSS
Here we need to create two separate file .css file and .html file.
For Example-
HTML file consisting of “mystyle.css”
<html>
<head>
<link rel="stylesheet“ type="text/css" href="mystyle.css" />
</head>
<body>
<p> paragraph</p>
<hr>
</body>
</html>
CSS Code- CSS files saved as “mystyle.css”
<html>
<head>
hr {color:sienna;} p {margin-left:20px;} body
{background-image:url("images/Blue hills.jpg");}
</head>
</html>
CONCLUSIONS:
With the help of given information about CSS we can create webpage using css.
5. Lab Exercise
Tools: Notepad Editor and Web Browser like Internet Explorer or Mozilla Firefox.
THEORY:
What is Multimedia?
Multimedia comes in many different formats. It can be almost anything you can hear or see.
Examples: Images, music, sound, videos, records, films, animations, and more.
Web pages often contain multimedia elements of different types and formats.
HTML5 defines DOM methods, properties, and events for the <video> element.
This allows you to load, play, and pause videos, as well as setting duration and volume.
There are also DOM events that can notify you when a video begins to play, is paused, etc.
Tag Description
<source> Defines multiple media resources for media elements, such as <video> and
<audio>
Tag Description
<source> Defines multiple media resources for media elements, such as <video> and
<audio>
CONCLUSIONS:
With the help of given procedure and information we can embed multimedia inside
a webpage.
6. Lab Exercise
Tools: Notepad Editor and Web Browser like Internet Explorer or Mozilla Firefox.
THEORY:
Introduction to JavaScript
Variables in JavaScript
When you write JavaScript function, you will you will need to determine when it
will run, Often this will be when a user does something like submit a form,
Validation prompt should appears.
Data Validation
Data validation is the process of ensuring that user input is clean, correct, and useful.
Most often, the purpose of data validation is to ensure correct user input.
Validation can be defined by many different methods, and deployed in many different ways.
Server side validation is performed by a web server, after input has been sent to the server.
Client side validation is performed by a web browser, before input is sent to a web server.
In this example, we are going to validate the name and password. The name can’t be empty and
password can’t be less than 6 characters long.
Here, we are validating the form on form submit. The user will not be forwarded to the next page
until given values are correct.
<script>
function validateform(){
var name=document.myform.name.value;
var password=document.myform.password.value;
if (name==null || name==""){
return false;
}else if(password.length<6){
return false;
</script>
<body>
</form>
<script type="text/javascript">
function matchpass(){
var firstpassword=document.f1.password.value;
var secondpassword=document.f1.password2.value;
if(firstpassword==secondpassword){
return true;
}
else{
return false;
</script>
<input type="submit">
</form>
CONCLUSIONS:
With the help of given information about the use of Events and Functions, We can
Design a Signup form with all validations
7. Lab Exercise
Tools: Notepad Editor and Web Browser like Internet Explorer or Mozilla Firefox.
THEORY:
Introduction to JavaScript
A leap year is a year containing one additional day added to keep the calendar year
synchronized with the astronomical or seasonal year. Because seasons and astronomical
events do not repeat in a whole number of days, calendars that have the same number of days
in each year drift over time with respect to the event that the year is supposed to track. By
inserting an additional day or month into the year, the drift can be corrected. A year that is
not a leap year is called a common year.
Every year that is exactly divisible by four is a leap year, except for years that are exactly
divisible by 100, but these centurial years are leap years if they are exactly divisible by 400.
For example, the years 1700, 1800, and 1900 are not leap years, but the year 2000 is.
Step-5 : The year is not a leap year (it has 365 days).
Sample Solution:
HTML Code:
<!DOCTYPE html>
<html>
<head>
</head>
<body>
</body>
</html>
JavaScript Code:
function leapyear(year)
return (year % 100 === 0) ? (year % 400 === 0) : (year % 4 === 0);
console.log(leapyear(2016));
console.log(leapyear(2000));
console.log(leapyear(1700));
console.log(leapyear(1800));
console.log(leapyear(100));
CONCLUSIONS:
With the help of given procedure and information we have written javascript to find
given year is leap or not.
8. Lab Exercise
Tools: Notepad Editor and Web Browser like Internet Explorer or Mozilla Firefox.
THEORY:
Fahrenheit and centigrade are two temperature scales in use today. The Fahrenheit scale was
developed by the German physicist Daniel Gabriel Fahrenheit. In the Fahrenheit scale, water
freezes at 32 degrees and boils at 212 degrees.
The centigrade scale, which is also called the Celsius scale, was developed by Swedish
astronomer Andres Celsius. In the centigrade scale, water freezes at 0 degrees and boils at
100 degrees. The centigrade to Fahrenheit conversion formula is:
C = (5/9) * (F - 32)
where F is the Fahrenheit temperature. You can also use this Web page to convert Fahrenheit
temperatures to centigrade
Sample Solution:
HTML Code:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Write a JavaScript program to convert temperatures to and from celsius,
fahrenheit</title>
</head>
<body>
</body>
</html>
JavaScript Code:
function cToF(celsius)
{
var cTemp = celsius;
var cToFahr = cTemp * 9 / 5 + 32;
var message = cTemp+'\xB0C is ' + cToFahr + ' \xB0F.';
console.log(message);
}
function fToC(fahrenheit)
{
var fTemp = fahrenheit;
var fToCel = (fTemp - 32) * 5 / 9;
var message = fTemp+'\xB0F is ' + fToCel + '\xB0C.';
console.log(message);
}
cToF(60);
fToC(45);
CONCLUSIONS:
Tools: Notepad Editor and Web Browser like Internet Explorer or Mozilla Firefox.
THEORY:
If your new to the WordPress game and have never setup a site before then these steps will
walk you through it. These steps assume you are starting from scratch and all you have is an
idea lodged in your head or written down on paper.
CONCLUSIONS:
With the help of given procedure and information we can install wordpress and
setup the wordpress site.
10. Lab Exercise
Tools: Notepad Editor and Web Browser like Internet Explorer or Mozilla Firefox.
THEORY:
Introduction to Dreamweaver
Dreamweaver – what is it? Adobe Dreamweaver is a software application that allows you to
create and develop Web sites. Dreamweaver is considered WYSIWYG (What You See Is
What You Get), meaning that when you format your Web page, you see the results of the
formatting instead of the mark-ups that are used for formatting. However, Dreamweaver
allows you to hand code HTML as well. Dreamweaver also supports CSS and JavaScript as
well as other languages including ASP and PHP. Dreamweaver makes it easy to upload your
entire Web site to a Web server. You can also preview your site locally. Dreamweaver also
lets you create templates for your Web site that you can use again and again by modifying
certain unrestricted areas within the template. Then if you want to change one particular part
of your Web site (the logo changes, a main link changes), you only have to modify the
template for the changes to propagate throughout your Web site.
In this lab we will be getting a basic introduction to this software package.
Using Dreamweaver:
1. Start Dreamweaver. You should see a startup screen.
2. Create a New Site
Making your first Web Page:
3. You should now see a blank Web page in the Document Window.
4. Under the File Menu (top left of Dreamweaver work area), choose Save.
5. In the Save As box, find your Web site folder and save your file as index.html
6. Click Save. Congratulations! You’ve created your first Web page using Dreamweaver.
Unfortunately, it’s pretty boring at the moment.
7. Give your Web Page a Title
8. Adding Some Content
9. Playing with Font Properties
10. Alignment etc.
Starting up
Before starting, make sure that your tools and panels are consistent by resetting your
workspace.
In this lesson, you begin by using the Site Setup dialog box to accomplish the following
tasks:
Define the site
Name the site
Define the local root folder
Set up a remote folder
Explore advanced settings
Save the site
By default, the Site Setup dialog box opens with the Site Settings available. The options
available here will help guide you through the essentials of defining your site. The Servers,
Version Control, and Advanced Settings options allow you to set up local, remote, and testing
servers directly.
1. Launch Dreamweaver CC, if it is not already open, then choose Site > New Site. First, you
have to name the site. In the Site Name text field, type Organic Utopia.
Type the Site Name into the text field.
Next, you need to set up a local root folder, which is where Dreamweaver stores the files with
which you’re currently working. The Local Site Folder field allows you to enter information
regarding where you’ll be working with your files during development.
2. Click the Folder icon to the right of the Local Site Folder text field to navigate to any pre-
existing files.
If you did not click on the folder icon and just clicked Save, Dreamweaver would simply
create a new folder on your system where you could begin to create new pages in your site. In
this case, you will be pointing to a preexisting folder that already has files within it.
It is important to distinguish between adding a new site (which is what you are doing now)
and creating a new site from scratch. In both cases, the important part is that Dreamweaver
knows where this folder is on your system. This folder is known as the root folder and will
always contain the content that will eventually be your website.
3. Navigate to your desktop and locate the dw02lessons folder you copied to your desktop
earlier.
4. Select the dw02lessons folder. On the Windows platform, click Open to open this folder,
then press Select (Windows). On the Mac OS platform, click Choose to choose this as your
local root folder. The field now shows the path to your newly defined local root folder.
At this point, you have done the minimum amount of steps required to begin working on a
site. Now you will take a look at some of the optional features within the Site Setup process.
5. Click the Servers tab. This section allows you to define the remote server where your
website will end up being hosted. Take a moment to read the heading in the dialog box. Note
that it says you do not need to fill in this information to begin creating a website. It is only
necessary if you are connecting to the Web.
6. Click the + button and the Basic site settings window appears. Here there are fields for
Server Name, Connect Using, FTP Address, Username and Password, along with other
options. These settings allow you to choose both a destination and a method (FTP being the
most common) for Dreamweaver to use to transfer files.
Set up access to your remote folder.
As noted earlier, this is an optional step, and you do not have to define your remote folder at
this stage. Dreamweaver allows you to define your remote folder at a later time, such as when
you’re ready to upload.
7. Click the Advanced tab. Click the Server Model menu in the Testing Server section. Here
there are choices for different scripting languages such as PHP and ASP pages. If you are an
advanced user, this is where you would set up the connections to your testing server.
Again, you won’t be making any changes here, so click Cancel.
8. Click the Version Control option on the left to access Subversion settings. Subversion, a
VCS (or version control system), keeps track of changes made to files, enabling users to track
changes and return to previous versions of any file. For this exercise, make sure the Access
pull-down in this window is set to None, as you won’t be using Subversion.
You’ve now completed the site setup process using basic settings.