0% found this document useful (0 votes)
3 views11 pages

HTML and JavaScript Programming Examples

Uploaded by

rc851569
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views11 pages

HTML and JavaScript Programming Examples

Uploaded by

rc851569
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

SKILL ORIENTED PRACTICAL-2024-25

SOP:01 Write a program using HTML with following specifications.


<!DOCTYPE html>
<html>
<head>
<title> Practical No 1</title>
</head>
<body bgcolor=”Green” text=”Red”>
<H1> My First Web Page </H1>
<hr size=”4” color=”Yellow”>
<B>Fravashi Town Academy </B><br><br>
<I> Trimbak Road<br> Nashik</I>
<H2> Standard : XI </H2>
</body>
</html>

SOP:02 Write a program using HTML with following specifications.


<!DOCTYPE html>
<html>
<head>
<title> Practical No 1</title>
</head>
<body>
<img src=”[Link]” alt=”Henry”
<br><br>
<p> Henry Jeffrey’s Moseley( 23 November 1887- 10 August 1915) was an
English Physicist, whose contribution to the science of physics was the
justification from physical laws of the previous empirical and chemical concept
of the atomic number. This stemmed from his development of Moseley’s law in
X-ray spectra.
Nuclear battery technology began in 1913, when Henry Moseley first
demonstrated the beta cell.</p>
<br><br>
<table border=”5” bordercolor=”Pink” bgcolor=”Yellow”>
<tr>
<th> Sr No </th>
<th> Invention </th>
<th> Year </th>
</tr>
<tr>
<td>01 </td>
<td> Basic of Periodic Table</td>
<td> 1912</td>
</tr>
<tr>
<td>02 </td>
<td> Atomic Battery</td>
<td> 1913</td>
</tr>
</table>
</body>
</html>
SOP:03 Write a program using HTML with following specifications.
<!DOCTYPE html>
<html>
<head>
<title> Practical No 3</title>
</head>
<body bgcolor=”Green” text=”Red”>
<h1> align=”center”> Application Form</h1>
<form>
Enter your Name: <input type=”text” name=”t” value=””>
<br><br>
Standard : <br>
<input type=”radio” name=”r”> 11th <br>
<input type=”radio” name=”r”> 12th <br>
<input type=”submit” value=”Submit”>
<input type=”reset” value=”Reset”>
</body>
</html>

SOP:04 Write a program using HTML with following specifications.


<!DOCTYPE html>
<html>
<head><title>SOP4</title>
</head>
<body bgcolor="Pink" text="White">
<table height="150" width="300" border="3">
<tr bgcolor="Orange">
<th align="Center">Number of Students</th>
<th align="Center"> Boys</th>
<th align="Center">Girls</th></tr>
<tr bgcolor="Green">
<td align="Center"> 100</td>
<td align="Center">50</td>
<td align="Center">50</td></tr>
</table>
<A href="[Link]">Demo</A>
</body>
</html>
[Link]
<!DOCTYPE html>
<html>
<head><title>Demo</title>
</head>
<body>
<H1><B> STD-XI</B></H1>
<H1><I>Stream</I></H1>
<H1><U>DIV-A</U></H1>
<A href="[Link]">Page1</A>
</body>
</html>
SOP 1. Write a JavaScript program to accept integer and display the result by
multiplying it with 3.
<!DOCTYPE html>
<html>
<head><title>JavaScript program</title>
</head>
<body>
<script language="JavaScript">
<H1> Display the Result by Multiplying the no by 3</H1>
var no,r;
no=prompt("Enter any positive number=",0);
r=no*3;
[Link](" Result by Multiplying the no by 3=",+r);
</script>
</body>
</html>
SOP 2. Write a JavaScript program to accept two integers and display the larger
number.
<html>
<head><title> to check Greater number</title>
</head>
<body>
<script language="JavaScript">
var x,y;
x=prompt("Enter the first number=",0);
y=prompt("Enter the second number=",0);
if(x>y)
[Link]("X is Greater=",+x);
else
[Link]("X is Greater=",+y);
</script>
</body>
</html>
SOP 3. Write a JavaScript program to check user entered number is positive or
negative.
<html>
<head><title> to check positive or negative number</title>
</head>
<body>
<script language="JavaScript">
var x;
x=prompt("Enter the first number=",0);
if(x>0)
[Link]("No is Positive=",+x);
else
[Link]("No is Negative=",+x);
</script>
</body>
</html>
SOP4. Write a JavaScript program to accept two positive or negative numbers
& check whether they are equal or not.
<html>
<head><title> to check the nubmer</title>
</head>
<body>
<script language="JavaScript">
var x,y;
x=prompt("enter the first number=");
y=prompt("enter the second number=",0);
if(x==y)
alert("Numbers are equal");
else
alert("Numbers are not equal");
</script>
</body>
</html>
SOP5. Write a JavaScript program to accept number and display square of it.
<html>
<head><title>Square</title>
</head>
<body>
<script language="JavaScript">
var x,s,c;
x=prompt("Enter the first number=",0);
s=x*x;
c=x*x*x;
[Link]("Square of a Nubmer=",+s);
[Link]("<br>");
[Link]("Cube of a Nubmer=",+c);
</script>
</body>
</html>
SOP6. Write a JavaScript program to check whether the accepted integer is
multiple of 3 or multiple of 7.
<html>
<head><title> to check the nubmer</title>
</head>
<body>
<script language="JavaScript">
var no;
no=prompt("Enter any Number=",0)
if(no%3==0 || no%7==0)
alert("Number is multiple of 3 or 7");
else
alert("Number is not multiple of 3 or 7");
</script>
</body>
</html>
SOP7. Write a JavaScript program to accept string and calculate its length.
<html>
<head><title>To calculate the lenth of the string</title>
</head>
<body>
<script language="JavaScript">
var n,x;
n=prompt("enter any string");
x=[Link];
[Link]("<br> String is" +x);
</script>
</body>
</html>
SOP8. Write a JavaScript program to accept string and display it into lowercase
and uppercase.
<html>
<head><title> To display the string in uppercase & lowercase</title>
</head>
<script language="JavaScript">
var n;
n=prompt("enter any String");
[Link]("<br> String is <br>" +[Link]());
[Link]("<br>");
[Link]("<br> String is <br>" +[Link]());
</script>
</html>
SOP9. Write a JavaScript program to check whether the length of string is 4 or
greater.
<html>
<head><title>To calculate the lenth of the string</title>
</head>
<body>
<script language="JavaScript">
var n,x;
n=prompt("enter any string");
x=[Link];
[Link]("<br> String is" +x);
if(x>4)
[Link]("String length is more than 4 characters");
else
[Link]("String length is less than 4 characters");
</script>
</body>
</html>
SOP10. Write a JavaScript program to accept number and validate if the given
value is a number or not by clicking on the button.
<!DOCTYPE html>
<html>
<head><title> To Validate input</title>
<script language="JavaScript">
function check()
{
var x;
x=[Link];
if(x>0)
{
[Link]("The input is a Number");
else
[Link]("The input is not a Number");
}
}
</script>
</head>
<body>
<form name="f1">
Enter the Input<input type="text" name="t1" value=""><br><br>
<input type="button" name="b" value="Validate" onClick="check()">
</form>
</body>
</html>
SOP11. Write a JavaScript program to calculate addition and division of two
numbers.
<!DOCTYPE html>
<html>
<head><title> Event Driven Program</title>
<script language="JavaScript">
function add()
{
var a,b,c;
a=[Link];
b=[Link];
c=parseInt(a)+parseInt(b);
[Link]("Addition=",+c);
}
function div()
{
var a,b,d;
a=[Link];
b=[Link];
d=a/b;
[Link]("Division=",+d);
}
</script>
</head>
<body>
<form name="f1">
Enter the first Number:<input type="text" name="t1"><br><br>
Enter the Second Number:<input type="text" name="t2"><br><br>
<input type="button" name="b" value="Addition" onClick="add()">
<input type="button" name="b1" value="Division" onClick="div()">
</form>
</body>
</html>
*********************

You might also like