0% found this document useful (0 votes)
3 views

IT PRACTICAL PROG FILE

The document contains a series of Standard Operating Procedures (SOPs) for creating HTML and JavaScript programs. Each SOP outlines specific requirements for web pages, including formatting, content, and functionality, along with corresponding source code examples. The SOPs cover topics such as webpage design, form creation, and JavaScript programming for various tasks like mathematical operations and string manipulation.

Uploaded by

playerfour240
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

IT PRACTICAL PROG FILE

The document contains a series of Standard Operating Procedures (SOPs) for creating HTML and JavaScript programs. Each SOP outlines specific requirements for web pages, including formatting, content, and functionality, along with corresponding source code examples. The SOPs cover topics such as webpage design, form creation, and JavaScript programming for various tasks like mathematical operations and string manipulation.

Uploaded by

playerfour240
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Skill Set 2- HTML 5

SOP 1: Write a program using HTML with the following specifications.

 The background colour should be green.


 The text colour should be red.
 The heading should be as large in size as ‘My First Web Page’.
 Display a horizontal line after the heading.
 Display your name in Bold, address in Italics, and standard as 11th.

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.

 Image of any scientist with an alternate text as his name.


 Create a paragraph related to the information of that scientist.
 Create a table of his/her inventions.

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:

<! DOCTYPE html>


<html>
<head> <title> sop3</title>
</head>
<body>
<h1 align=center> Application Form </h1>
<form>
Enter Name:<input type=text name=t1>
<br><br>
Standard:<br>
<input type=”radio” name=r1>11th<br>
<input type=”radio” name=r1>12th<br>
<br><br>
<input type=”submit” value=”Submit”>
</form>
</body>
</html>

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.

 Link this page to another page as follows.

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:

To check whether the accepted integer is multiple of 3 or multiple of 7.


<!DOCTYPE html>
<html>
<head>
<title>To check whether the accepted integer is multiple of 3 or multiple of 7.</title>
</head>
<body>
<script language=”JavaScript”>
var a;
a=prompt(“Enter your first interger / number”);
if(a%3==0 | | a%7==0)
alert(“multiple of 3 or 7”);
else
alert(“not a multiple of 3 or 7”);
</script>
</body>
</html>
Output:
SOP3: Create JavaScript program for the following using appropriate variables,
JavaScript inbuilt string functions and control structures.
 To accept string and calculate its length.

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:

You might also like