INDEX
Sr.
No.
|
PROGRAM
|
Page No.
|
Remarks
|
1.
|
Write a Program To show
the use of HTML basic Tag.
|
|
|
2.
|
Write a program to create
a different type of list.
|
|
|
3.
|
Write a program to Create
a Table In HTML.
|
|
|
4.
|
Write a program to Insert
Image in HTML Page.
|
|
|
5.
|
Write a program to Create
HTML form.
|
|
|
6.
|
Write a program to
Implement internal CSS In HTML page.
|
|
|
7.
|
Write a program to Show
the use of operator in Php .
|
|
|
8.
|
Write a program to
Implement external CSS in HTML page.
|
|
|
9.
|
Write a program to find
greater number form three number in Php.
|
|
|
10.
|
Write a program to
Demonstrate the use of switch case statement in Php.
|
|
|
11.
|
Write a program in to Demonstrate the use of user define
function.
|
|
|
12.
|
Write a program in php to
create and append the text file.
|
|
|
13.
|
Write a program to
implement if else statement in java script.
|
|
|
14.
|
Write a program to
implement java script function.
|
|
|
15.
|
Write a program to
implement event in java script.
|
|
|
1. WAP to show the use of html basic tag.
<html>
<head>
<title>sgtb college
msc 2nd year
</title>
</head>
<body>
SRI GURU TEG BAHADUR KHALSA COLLEGE
SRI ANADPUR SAHIB
</body>
</html>
2.WAP
to create different types of list.
<html>
<head>
<title>Raman</title></head>
<h1><u>list of name</u></h1>
<ol>
<li>Sohan</li>
<li>Raman</li>
<li>Madan</li>
</ol>
<ol style="list style_type:circle">
<li>Sohan</li>
<li>Raman</li>
<li>Madan</li>
</ol>
<ol
style="list style_type:squre">
<li>Sohan</li>
<li>Raman</li>
<li>Madan</li>
</ol>
<h2>unorder list</h2>
<ul style="list_
style_type:rectangle">
<li>Sohan</li>
<li>Raman</li>
<li>Madan</li>
</ul>
<ul
style="list_ style_type:squre">
<li>Sohan</li>
<li>Raman</li>
<li>Madan</li>
</ul>
<ul style="list style_type:circle">
<li>Sohan</li>
<li>Raman</li>
<li>Madan</li>
</ul>
<h3>defination list</h3>
<dl>
<dt><b>dpt.comp.</b></dt>
<dd>bca</dd>
<dd>msc.it</dd>
<dd>pgdca</dd>
<dt><b>english</b></dt>
<dd>ma</dd>
</dl>
<h6><b>types of coffe</b></h6>
<ol>
<li>coffe</li>
<dd>cold coffe</dd>
<dd>hot coffe</dd>
</html>
3. WAP to create a table in html.
<html>
<head><title>table</title><head>
<body>
<table border="3"
width="50%">
<tr>
<th>name</th>
<th>class</th>
<th>roll no.</th>
</tr>
<tr>
<td>Sohan rani</td>
<td>msc</td>
<td>162004</td>
</tr>
<tr>
<td>Raman</td>
<td>msc</td>
<td>162003</td>
</tr>
<tr>
<td>kajari</td>
<td>msc</td>
<td>162005</td>
</tr>
</table>
</body>
</html>
4. WAP to insert image in html page.
<html>
<title>kajalranjeet</title>
<hr size="3"
color="blue">ranjeet
<hr size="3"
color="blue">kajalranjeet
<hr size="3"
color="blue">kajal
<hr size="3" color="blue
">kajalranjeet
<IMG
SRC="C:\Users\msc-it\Desktop\SUMAN.jpg">
</html>
5. WAP to create html form.
<html>
<head>
<title>form</title>
<style>
h1{font-size:50px;color:green;text-align:center;}
</style>
</head>
<body>
<h1>html form</h1>
<form>
name<input
type="text"><br>
password<input
type="password"><br>
class
<select>
<option>bca</option>
<option>mca</option>
<option>ma</option>
<option>msc it</option>
</select><br>
gender male<input type="radio"
name="radio"value="m">
female<input type="radio"
name="radio"value="f"><br>
interest:  
music<input
type="checkbox"name=c1 value="music">
dancing<input
type="checkbox"name=c2 value="dancing">
swiming<input
type="checkbox"name=c3 value="swiming">
singing<input
type="checkbox"name=c4 value="singing"></br>
<input type="submit"
value="submit">
<input
type="button"value="cancle">
</form>
</body>
</html>
‘
6. WAP in html for internal css.
<html>
<head>
<title>form</title>
<style>
h1{font-size:50px;color:green;text-align:center;}è(internal css)
</style>
</head>
<body>
<h1>html form</h1>
<form>
name<input
type="text"><br>
password<input
type="password"><br>
class
<select>
<option>bca</option>
<option>mca</option>
<option>ma</option>
<option>msc it</option>
</select><br>
gender male<input type="radio"
name="radio"value="m">
female<input type="radio"
name="radio"value="f"><br>
interest:  
music<input
type="checkbox"name=c1 value="music">
dancing<input
type="checkbox"name=c2 value="dancing">
swiming<input
type="checkbox"name=c3 value="swiming">
singing<input
type="checkbox"name=c4 value="singing"></br>
<input type="submit" value="submit">
<input
type="button"value="cancle">
</form>
</body>
</html
>
‘
7.WAP in php using operators.
<?php
$a=20;
$b=10;
echo $a-$b
."<br> ";
echo$a*$b."<br>";
echo$a%$b."<br>";
echo$a/$b."<br>";
?>
8.WAP to
Implement external css in html page.
<html>
<head>
<title>form</title>
<link
rel="stylesheet"type="text/css"href="a.css">è (external css use here)
</head>
<body>
<h1>STUDENT FORM</h1>
<h2 >DOCUMENT</h2>
<h3
id="detail">DETAIL</h3>
<form name="form 1">
<label
class="a">Name</label><input
type="text"><br>
<label class="a">Roll
No</label><input type="text"><br>
<select>
<label
class="a">Class type:</label>
<option>PGDCA</option>
<option>BCA</option>
<option>M.SC.IT</option>
<option>BBA</option>
<option>M.COM</option>
</select><br>
<label
class="a">Gender</label>: Male<input
type="radio"name="radio"value="M">
Female<input
type="radio"name="radio"value="F"><br>
<label
class="a">Hobbies</label>:
Playing<input type="checkbox"name="c1"value="Playing">
Singing<input
type="checkbox"name="c2"value="Singing">
Reading<input
type="checkbox"name="c3"value="reading"><br>
<label
class="a">About</label><textarea></textarea><br>
<input
type="submit"value="submit">
</form>
</body>
</html>
output
9.WAP to find greater number from
three numbers in php.
<?php
$a=10;
$b=20;
$c=10;
if($a>$b)
{
if($a>$c)
{
echo"$a is
greater";
}
else
{
echo"$c is
greater";
}
}
else if($b >$c)
{
echo"$b is
greater";
}
else
{
echo "$c is
greater";
}
?>
10.WAP to demonstrate the use of switch case statement
in php.
<?php
$favcolor = "red";
switch ($favcolor) {
case "red":
echo "Your favorite color is
red!";
break;
case "blue":
echo "Your favorite color is
blue!";
break;
case "green":
echo "Your favorite color is
green!";
break;
default:
echo "Your favorite color is neither
red, blue, nor green!";
}
11.WAP in to demonstrate the use of user defined function.
<html>
<head>
<title>user-defined
objects</TITLE>
<SCRIPT TYPE="TEXT/JAVASCRIPT">
Function userobj()
{
var person=new Object();
person.firstname="sukh";
person.lastname="deep";
person.age=25;
person.eyecolor="brown";
document.write(person.firstname+"is
" +person.age+"years old.");
}
</script>
</head>
<body>
<h2>user=defined object
in javascript.</h2>
<button
onclick="userobj()">try it</button>
</body>
</html>
12.WAP in php to create and append
the text file.
<?php
$f_name="info.txt";
$file=fopen($f_name,'a');
if($file==false)
{
echo("error");
exit();
}
fwrite($file,"aps");
echo("successful");
fclose($file);
?>
13. Write a program to
implement if else statement in java script.
<!DOCTYPE html>
<html>
<body>
<p>Click the button
to display a time-based greeting.</p>
<button
onclick="myFunction()">Try it</button>
<p
id="demo"></p>
<script>
function myFunction() {
var time = new Date().getHours();
var greeting;
if (time < 20) {
greeting = "Good day";
} else {
greeting = "Good evening";
}
document.getElementById("demo").innerHTML
= greeting;
}
</script>
</body>
</html>
14.write a program to implement java script function.
<!DOCTYPE html>
<html>
<body>
<h2>JavaScript Functions</h2>
<p>This example calls a function
which performs a calculation and returns the result:</p>
<p id="demo"></p>
<script>
function myFunction(a, b) {
return a * b;
}
document.getElementById("demo").innerHTML
= myFunction(4, 3);
</script>
</body>
</html>
15.WAP to implement event in java script.
<!DOCTYPE html>
<html>
<head>
<script>
function displayDate() {
document.getElementById("demo").innerHTML = Date();
}
</script>
</head>
<body>
<h2>My First JavaScript</h2>
<p id="demo">This is a
paragraph.</p>
<button type="button"
onclick="displayDate()">Display Date</button>
</body>
</html>
No comments:
Post a Comment