IT PRACTICAL PROG FILE
IT PRACTICAL PROG FILE
Source Code:
<!DOCTYPE html>
<html>
<head>
<title>sop1</title>
</head>
<body bgcolor=green text= red>
<h1> My First Web Page </h1>
<hr>
<b> Reliable Publications</b>
<br>
<i> Chira bazar,Charni road,Mumbai</i>
<br>
Standard 11th.
</body>
</html>
Output:
SOP 2: Create a web page with, following specifications.
Source Code:
<!DOCTYPE html>
<html>
<head>
<title>sop2</title>
</head>
<body>
<img src=”Albert Einstein.jpg” alt=”Albert Einstein”>
<br>
<p>
Albert Einstein was a German-born theoretical physicist who developed the theory of
relativity,<br> one of the two pillars of modern physics.His work is also known for its influence
on the philosophy of science.
</p>
<table border=5 bordercolor=pink>
<tr>
<th> Sr no.</th>
<th> Invention </th>
<th> Year</th>
</tr>
<tr>
<td>1</td>
<td>Quantum Theory of Light </td>
<td>1905</td>
</tr>
<tr>
<td>2</td>
<td>Theory of Relativity</td>
<td>1907</td>
</tr>
</table>
</body>
</html>
Output:
SOP 3: Create a webpage with the following specifications.
Display heading ‘Application Form’ in the highest heading with center alignment.
Accept name, standard 11th or 12th with only one selection choice.
Submit the form.
Source Code:
Output:
SOP 4: Write a program using HTML with the following specification.
A webpage with details about a class with a total number of students-100, (Boys – 50), Girls
– 50 in tabular form. e.g.
Demo.html
Source Code:
<!DOCTYPE html>
<html>
<head>
<title>New Page 1</title>
</head>
<body>
<center>
<table border=”1” width=”69%” >
<tr bgcolor=pink>
<td>Number of Students</td>
<td>Boy</td>
<td>Girls</td>
</tr>
<tr bgcolor=”lightgreen”>
<td>100</td>
<td>50</td>
<td>50</td>
</tr>
</table>
</body>
</html>
Output:
Demo
<!DOCTYPE html>
<html>
<head>
<title>the heading</title>
</head>
<BODY>
<header>
<center>
<table border=”1” align=center>
<tr align=center>
<td><a href=”sop4.html”>STD – XI</a>
<br>Stream – Science<br>
Div – A<br></td>
</tr>
</table>
</body>
</html>
Output:
Skill Set 3- JavaScript
SOP 1: Create a JavaScript program for the following using appropriate variables,
JavaScript inbuilt functions, and control structures.
To accept an integer and display the result by multiplying it with 3.
To accept two integers and display a larger number of them.
To check whether the user entered number is positive or negative.
Source Code:
To accept integer and display the result by multiplying it with 3.
<!DOCTYPE html>
<head>
<title>To accept integer and display the result by multiplying it with 3.</title>
</head>
<body>
<script language=”javascript”>
var a,no,ans;
a=prompt(‘Enter any value’);
no=parseInt(a);
ans=no*3;
document.write(“The answer is :”+ans);
</script>
</body>
</html>
Output:
To accept two integers and display larger number of them.
<!DOCTYPE html>
<head>
<title>To accept two integers and display larger number of them.</title>
</head>
<body>
<script language=”javascript”>
var a,b;
a=prompt(‘Enter first value’);
b=prompt(‘Enter second value’);
if(a>b)
document.write(“a is large number than b “);
else
document. write(“b is large number than a”);
</script>
</body>
</html>
Output:
To check whether, user entered number is positive or negative.
<!DOCTYPE html>
<head>
<title>To check whether, user entered number is positive or negative</title>
</head>
<body>
<script language=”javascript”>
var a,no;
a=prompt(‘Enter any number’);
no=parseInt(a);
if(no>0)
document.write(“Number is Positive”);
else
document.write(“Number is Negative”);
</script>
</body>
</html>
Output:
.
SOP 2: Create a JavaScript program for the following using appropriate variables,
JavaScript inbuilt functions, and control structures.
To accept two positive or negative numbers and check whether they are equal or
not.
To accept a number and display the square of it.
To check whether the accepted integer is multiple of 3 or multiple of 7.
Source Code:
To accept two positive or negative numbers and check whether they are equal or not.
<!DOCTYPE html>
<head>
<title>program3</title>
</head>
<body>
<script language=”javascript”> var no1,no2;
no1=prompt(‘Enter first number’);
no2=prompt(‘Enter Second number’);
if(no1==no2)
document.write(“Both are equal”);
else
document.write(“Given numbers are not equal”);
</script>
</body>
</html>
Output:
To accept number and display square of it.
<!DOCTYPE html>
<head>
<title>To accept number and display square of it</title>
</head>
<body>
<script language-“javascript”>
var no,sqr;
no=prompt(‘Enter Any number’);
sqr=no*no;
document, write (“The Square is=”+sqr);
</script>
</body>
</html>
Output:
Source Code:
<!DOCTYPE html>
<html>
<head>
<title>sop3</title>
</head>
<body>
<h1> To accept string and calculate its length </h1>
<script language=javascript>
var n
n=prompt("Enter any text")
s=n.length
document.write("Length of the string is "+s)
</script>
</body>
</html>
Output:
To accept string and display it into lowercase and uppercase.
<!DOCTYPE html>
<html>
<head>
<title>sop3</title>
</head>
<body>
<h1> To accept string and display it into lowercase and uppercase </h1>
<script language=javascript>
var n
n=prompt("Enter any text")
s1=n.toUpperCase()
s2=n.toLowerCase()
document.write("Uppercase of the string is "+s1 + "<br>")
document.write("Lowercase of the string is "+s2)
</script>
</body>
</html>
Output:
To check whether the length of string is 4 or greater.
<!DOCTYPE html>
<html>
<head>
<title>sop3</title>
</head>
<body>
<h1> To check whether the length of string is 4 or greater </h1>
<script language=javascript>
var n
n=prompt("Enter any text")
if(n.length>=4)
document.write("Length of the string is greater than or equal to 4")
else
document.write("Length of the string is less than 4")
</script>
</body>
</html>
Output: