WT Practical
WT Practical
Cotents
Experiment1 : Write codes to create a web page using the
following tags :
a) Text b) Marquee c) Character formatting tags such as
B, I, U. .........-2
Experiment2 : Write codes to create a web page using font ex-2
color. font face, font size
and background color. .L -3
Experiment 3 : Write codes to create a web page using paragraph
tags such as P tag
and BR tag. .L -3
Experiment4 : Write codes to create a web page using nesting of lists. ....L - 4
Experiment 5 : Write codes to create a web page using table tags
a) Create atable of 3. rows and columns.
b) Having border, border size, border-color
c) Insert an image in aparticular cell. ... L-5
Experiment 6 : Write codes to create a web page using the form tag.
Example:- Admissionform. ... L-6
Experiment 7 : Create a JavaScript code to display any message.. ...L - 8
Experiment 8 : Create a JavaScript code using control statements. .L -9
Experiment 9 : Create a JavaScript code using an arithmetic operator, assignment operator,
comparison operator, logical operator and string operator..... .L- 10
Experiment 10: Create a JavaScript code to display 5 *1 =55 *2 = 10.. 5 *10 =50 using
for loop'. .L - 11
Experiment 11 : Create a JavaScript code using the user defined function, which will calculate
the area of a circle ... L - 12
Experiment 12: Write a JavaScript code to change the Web Page's background color. L - 13
Experiment 13: Write a JavaScript code to display the factorial of thegiven number....L- 14
(L- 1)
L-2
Fundamentals of Web Technology
Laboratory
Free Download Softcopy of All Lab
Programns using this QR Code
Experiment Number 1 + X
X
A
OFile E:/Manuscript/Auton..
All Bookmarks
This webpage demonstrates the text tag, marquee and text formatting
tags(such as B,I and U)
OFile E:/Manuscript/Auton.. A
All Bookmarks
Experiment 3 : Write codes to create a web page using paragraph tags such as P
tag and BR tag.
Solution:
<!DOCTYPE html>
<html>
<head>
<title> Experiment No. 3 </title>
<body>
TECHNICAL PUBLICATIONs- an up-thrust for knowledge
Fundamentals of Web Technology L-4
Laboratory
<b>Dr. A.P.J. Abdul Kalam </b>
<br/>
<p>
th
Dr. APJ Abdul Kalanm, a space scientist was born on 15" October 1931 in Rameswaram,
th
Tamil Nadu. From selling newspaper at a young age to becoming 1 President of India,
Dr. Kalam's life has been truly inspirational. His association with ndia's space and missile
development program earned him the name "Missile Man".
Dr. Kalam was sworn in as 1I"th President of India on 25 July 2002. He was called the
"People's President" because of his simplicity and his popularity cut across all age groups.
</p>
</body>
</html>
Output
Experiment No. 3 X + X
File E:/Manuscript/Autono..
AlI Bookmarks
Experiment No.4 + X
|
File
E:/Manuscript/Auton... (A
o All Bookmarks
Operating Systems
A. Windows
B. Linux
" Computer Science Subjects
I. Operating system
II Web Programming
> Experiment 5 : Write codes to create a web page using table tags
a) Createa table of 3 rows and columns.
b) Having border, border size, border-color.
c) Insert an image in a particular cell.
Solution :
<DOCTYPE html>
<html>
<head>
Experiment No. 5 X X
A
OFile E/Manuscript/...
AlI Bookmarks
AB
H
|FG
Experiment 6 :Write codes to create a web page using the form tag.
Example:- Admission form.
<head>
>Experiment:
<title> No. 6</title>
</head>
cbodybgcolor="khaki'
<center><h3> Admission Form </h3><
</center>
<form>
cstrong>Name: </strong>
=text name =name><br/
<input type=
cstrong>Age: </strong>
<inputtype=text name=Age txt><br/>
cstrong>Phone No:</strong>
sinput type=text name=ph txt> <br/>
<br/> <br/>
<strong>Select Course:</strong>
<select name="My Menu">
<option value='Comnputer Engineering'>Computer Engineering </option>
<option value="Mechanical Engineering'> Mechanical Engineering</option>
<option value ='Electrical Engineering'> Electrical Engineering</option>
</select>
<center>
<br/>
<input type=submit value=Submit></br>
</center>
</body>
</html>
E:/Manuscript/Autonomous_GTU. * A
O File
All Bookmarks
Admission Form
Name:
Age:
Phone No:
Email:
Documents Submitted:
O10th Marks-sheet
D12th Marks-sheet
OCET Score Card
OIdentity Proof
OAddress Proof
OFle E/Manuscript/Autonomous_GTU. A
Good Morning!
OK
i(a>c)
document.write("<h3>a is largest number </h3>"):
else
document.write('<h3>cis largest number</h3>"):
}
else
if(b>c)
document. write("<h3>b is largest number</h3>");
else
document.write("<h3>c is largest number</h3>");
}
</script>
"+counter);
document.write("This statement number:
document. write("<br>");
Counter++;
}while(counter< =5):
</script>
</body>
</html>
arithmetic operator, assignment
Experiment 9: Create a JavaScript code using an
operator and string operator.
operator, comparisonoperator, logical
Solution :
<!DOCTYPE html>
<html>
<head>
<title>Experiment no. 9 </title>
</head>
<body>
and String Operator </h3>
<h3> Demonstration of Arithmetic, Assigment,logical,
<script>
I|Arithmetic Operator: Addition
let a = 10;
let b = 20;
let sum =a + b:
another variable
/Assignment Operator: Assigning the value of sum to
let result = sum;
100
I/Comparison Operator: Checking if result is greater than
let c = result > 100;
I/ Logical Operator: Logical AND
let logicalCheck =c && (b> 0);
I/ String Operator: Concatenation
let str1 = "Hello":
let str2 = "Friend';
document.
.write('sum: "+sum);
document.
"<br>");
write("
.
document..wwrite("Result:""+result);:
document. write("<brs").
document.
writel('Is Greater Than Hundred:"-+c);
document.write("<br>").
document.write("Logical Check:"+logicalCheck):
document. write("<br>"):
document.write(("String Operation:"+str3);
</script>
<body>
</html>
Output
S Experiment no. 9
G O File E:/Manuscript/Auto... t A
All Bookmarks
<script>
for (i=1; i<=10; it+)
Laborator
document,write("5 *"+i+"= "+(5*i)+"<br/>";
</script>
</table>
</body>
</html>
Output
Experiment No.10 X +
X
O File E:/Manuscript/Auton.. t A
All Bookmarks
5 * =5
5*2= 10
5*3= 15
5 * 4=20
5*5= 25
5*6=30
5*7=35
5 * 8= 40
5 *9=45
5 * 10= 50
Experiment 11 : Create a JavaScript code using the user defined function, which
will calculate the area of a circle.
Solution:
<!DOCTYPE html>
<html>
<head>
<script>
function myfunction(radius)
<Mead>
<body>
<Script
constr10:
ocument. write("The area of
circle of radius 10 is
</script>
="+myfunction(r)):
<pody>
</html>
Output
Exp11.htnl
File E/Manuscript/Auton... * A
All Bookmarks
</script>
</head>
<body>
<h3> Click the buttons to change the background </h3>
<form>
onclick="displayred()"7>
<nput type="button" value="Change to RED'
<br/><br/>
onclick='displaygreen()"/>
<nput type="button" value="change to GREEN"
</form>
</body>
</html>
Output
X + X
Experiment 12
A
O File E/Manuscript/Auton...
AlI Bookmarks
change to GREEN
}
else
return n * factorial( n - 1 ):
</script>
</head>
<body>
en>Factorial of number 5 is... </p>
<Script>
let n 5;
document. write(factorial(n));
</script>
</body>
</btml>
Output
Experiment 13
O File E/Manuscript/Auton. A
All Bookmarks
120