IT SOP
Section I-HTML
SOP 1- Write a program using HTML with following specifications.
· The Background color should be green.
· The text color should be red.
· The heading should be 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.
Solution-
<html>
<head>
<title>
HTML SOP 1
</title>
</head>
<body bgcolor="green" text="red">
<h1>My First Web Page</h1>
<hr>
<b>Name- Information Technology (XI) </b><br>
<i>Address- Maharashtra,India.</i><br>
<u>Std- 11th</u>
</body>
</html>
SOP 2 : Create a web page with, following specification.- Image of any scientist with an alternate text as his name.
- Create a paragraph related to information of that scientist.
- Create a table of his/her inventions.
Solution:-
<html>
<head>
<title>
HTML SOP 2
</title>
<body>
<h2>Albert Einstein</h2>
<img src="albert-einstein.jpg" alt="Albert Einstein">
<p>Albert Einstein was born on 14 March in the year 1879 in Württemberg, Germany. He was educated at the Swiss Federal
Institute of Technology in Zurich. Einstein was a theoretical physicist who discovered
and invented major theories of Physics. Albert Einstein received honorary doctorate degrees in science and philosophy. </p>
<p>He got the Fellowships of all the leading scientific academies in the world. His works were recognized across the
world and in 1921, Einstein won the prestigious
Nobel Prize for Physics for his significant work on the photoelectric effect.</p>
<table border="2">
<h2> Inventions of Albert Einstein</h2>
<th>Sr.No</th>
<th>Invention</th>
<th>Description</th>
<tr>
<td>1</td>
<td>Brownian Movement</td>
<td>The Brownian movement is one of the significant contributions of Albert Einstein.</td>
</tr>
<tr>
<td>2</td>
<td>Quantum Theory of Light</td>
<td>Einstein was the key person behind the quantum theory of light..</td>
</tr>
<tr>
<td>3</td>
<td>Photoelectric Effect</td>
<td>In 1905, Albert Einstein proposed this theory, which is the base of modern Physics.</td>
</tr>
</table>
</body>
</html>
SOP 3 : Create a web page with following specification. - Display heading 'Application Form' in highest heading with center alignment.
- Accept name, standard 11th or 12 th with only one selection choice.
Solution:-
<html>
<head>
<title>
HTML SOP 3
</title>
<body>
<h1 align="center">Application Form</h1>
<form name="sop3">
Enter your Name-<input type="text" name="uname"> <br>
Select Std. <input type="radio" name="std"> 11th
<input type="radio" name="std"> X12th <br>
<input type="submit" value="Submit">
</form>
</body>
</html>
SOP 4 : Write a program using HTML with the following specification.
- A webpage with details about a class with total number of students-100, (Boys50), Girls- 50 in tabular form.
- Link this page to another page
Solution:-
<html>
<head>
<title>
Class Information
</title>
<body>
<h2>Class-Information</h2>
<table border="2">
<th>Number of Students</th>
<th>Boys</th>
<th> Girls</th>
<tr>
<td>100</td>
<td>50</td>
<td>50</td>
</tr>
</table>
<br> <br>
<a href="classinfo.html">Click here for class Information</a>
</body>
</html>
classinfo.html
<html>
<head>
<title>
HTML Linked Page
</title>
<body>
<b>STD-XI </b> <br>
<b>Stream-Science</b> <br>
<u> DIV-A</u> <br>
</body>
</html>
Section II-Javascrit
SOP 1 -Create java script programs for following using appropriate variables,javascript inBuilt functions and control Strictures.
1)To accept integer and display the result by multiplying it with 3.
Solution-
<html>
<head>
<title>
SOP1
</title>
</head>
<body>
<script language="javascript">
var a=prompt("Enter a Number")
var b=a*3
document.write("Your Result is="+b)
</script>
</body>
</html>
2)To accept two integers and display larger number of them.
<html>
<head>
<title>
SOP2
</title>
</head>
<body>
<script language="javascript">
var a=prompt("Enter First Number")
var b=prompt("Enter Second Number")
if(a>b)
{
document.write("A is greater")
}
else
{
document.write("B is greater")
}
</script>
</body>
</html>
3)To check whether, user entered number is positive or negative.
<html>
<head>
<title>
SOP2
</title>
</head>
<body>
<script language="javascript">
var a=prompt("Enter Any Number")
if(a>0)
{
document.write("Number is Positive")
}
else
{
document.write("Number is Negative")
}
</script>
</body>
</html>
SOP 2 -Create javascript programs for following using appropriate variables,javascript inBuilt functions and control Strctures.
1)To accept two positive or negative numbers and check whether they are equal or not.
<html>
<head>
<title>
SOP2
</title>
</head>
<body>
<script language="javascript">
var a=prompt("Enter First Number")
var b=prompt("Enter Second Number")
if(a==b)
{
document.write("Both Numbers are equal")
}
else
{
document.write("Both Numbers are not equal")
}
</script>
</body>
</html>
2)To accept number and display square of it.
<html>
<head>
<title>
SOP2
</title>
</head>
<body>
<script language="javascript">
var a=prompt("Enter Number")
var b=a*a
document.write("Square of Given Number is="+b)
</script>
</body>
</html>
3)To check whether the accepted integer is multiple of 3 or multiple of 7
<html>
<head>
<title>
SOP2
</title>
</head>
<body>
<script language="java script">
var a=prompt("Enter Number")
if(a%3==0 || a%7==0)
{
document.write("Given Number is Multiple by 3 OR 7")
}
else
{
document.write("Given Number is NOT Multiple by 3 OR 7")
}
</script>
</body>
</html>
SOP 3 -Create java script programs for following using appropriate variables,java script in Built functions and control Strictures.
1)To accept string and calculate its length.
<html>
<head>
<title>
SOP2
</title>
</head>
<body>
<script language="javascript">
var a=prompt("Enter a String")
var b=a.length
document.write("The length of given string is"+b)
</script>
</body>
</html>
2)To accept string and display it into lowercase and uppercase.
<html>
<head>
<title>
SOP2
</title>
</head>
<body>
<script language="javascript">
var a=prompt("Enter a String in Lower Case")
var b=a.toUpperCase()
var c=prompt("Enter string in Uppercase")
var d=c.toLowerCase()
document.write("Lower To Uppercase String is="+b+ "<br>")
document.write("Upper To Lowercase String is="+d)
</script>
</body>
</html>
3)To check whether the length of string is 4 or greater.
<html>
<head>
<title>
SOP2
</title>
</head>
<body>
<script language="javascript">
var str=prompt("Enter a String")
var a=str.length
if(a>4)
{
document.write("String length is greater than 4")
}
else if(a==4)
{
document.write("String length is equal to 4")
}
else
{
document.write("String length is less than 4")
}
</script>
</body>
</html>
SOP 4 -Create javascript programs for following using appropriate variables,javascript inBuilt functions and control Strctures.
1) To accept number and validate if the given value is number or not by clicking on the button.
<html>
<head>
<title>
SOP2
</title>
</head>
<body>
<script language="javascript">
function Calc()
{
var a=prompt("Enter a String")
if(isNaN(a))
{
document.write("This is NOT Number")
}
else
{
document.write("This is Number")
}
}
</script>
<form name="f1">
<input type="submit" onClick="Calc()">
</form>
</body>
</html>
2)To Calculate addition and division of two numbers.
<html>
<head>
<title>
SOP2
</title>
</head>
<body>
<script language="javascript">
function Add()
{
var a=f1.t1.value
var b=f1.t2.value
var c=parseInt(a)
var d=parseInt(b)
var add=c+d
document.write("Addition is="+add)
}
function Div()
{
var a=f1.t1.value
var b=f1.t2.value
var c=parseInt(a)
var d=parseInt(b)
var div=c/d
document.write("Division is="+div)
}
</script>
<form name="f1">
1st Number<input type="text" name="t1"> <br>
2nd Number<input type="text"name="t2"><br>
<input type="submit" value="Addition" onClick="Add()">
<input type="submit" value="Divide" onClick="Div()">
</form>
</body>
</html>
No comments:
Post a Comment