WOT Practicle File: Manjotpal Singh UE188058 4 SEM It Section-1 (Gp-3)
WOT Practicle File: Manjotpal Singh UE188058 4 SEM It Section-1 (Gp-3)
WOT Practicle File: Manjotpal Singh UE188058 4 SEM It Section-1 (Gp-3)
PRACTICLE FILE
_________________________________________________________________________________________________________________________
MANJOTPAL SINGH
UE188058
4th SEM
IT SECTION-1 (GP-3)
Objective : To study table tag and its attributes in HTML
<!DOCTYPE html>
<head>
<title>WOT</title>
</head>
<body>
<tr>
<th></th>
<th>9-10</th>
<th>10-11</th>
<th>11-12</th>
<th>12-1</th>
<th>2-3</th>
<th>3-4</th>
<th>4-5</th>
</tr>
<tr>
<th>MON</th>
<td colspan="3">WOT-1</td>
<td></td>
<td colspan="3">WOT-2</td>
</tr>
<tr>
<th>TUE</th>
<td></td>
<td colspan="3">WOT-3</td>
</tr>
<tr>
<th>WED</th>
<td colspan="3"></td>
<td colspan="3">WOT-4</td>
<td></td>
</tr>
</table>
</body>
</html>
Objective : Use frameset and iframe in an HTML document.
<!DOCTYPE html>
<head>
<title>Registration form</title>
</head>
<body>
<form>
<option value="Male">Male</option>
<option value="Female">Female</option>
<option value="Transgender">Transgender</option></select>
<br><br>
<option value="Medical">Medical</option>
<option value="Non-Medical">Non-Medical</option></select>
<br><br>
Photograph:<input type="file" name="fileupload"
accept="image/*"/><br><br>
<br>
<center>
</center>
</form>
</body>
</html>
<!DOCTYPE html>
<head> <title>alert</title></head>
<body>
<script type="text/javascript">
if(a==true)
document.write("yahoo.com")
else
document.write("end")
}
</script>
</body>
</html>
Objective : To study prompt dialog boxes in javaScript.
<!DOCTYPE html>
<html lang="en">
<head>
<meta Charsret="UTF-8">
<title>JS</title>
</head>
<body>
prompt("Enter");
</script>
</body>
</html>
Objective : Introduction about style sheets and its types along with
implementation.
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Manjotpal</title>
<link rel="stylesheet" type="text/css"
href="css/styleassignment.css">
</head>
<body>
<header>
<h1>Manjotpal Singh</h1>
<nav>
</nav>
</header>
<section class="half">
<h2>Favourite Foods</h2>
<ul>
<li>Apple</li>
<li>Chocolate</li>
<li>Fish</li>
<li>Pizza</li>
</ul>
</section>
<section class="half">
<h2>Achievements</h2>
<p>
</p>
</section>
<section class="new">
<details>
<summary>My Childhood</summary>
</details>
</section>
<footer>
<p>
<img src=" http://www.intro-
webdesign.com/images/newlogo.png" alt="Logo"/>
</footer>
</body>
</html>
CSS
body{
background-color: #03A9F4;
margin: 2%;
font-size: 150%;
header{
background-color: #B3B3B3;
h1{
text-align: center;
font-size: 250%;
color: #424242;
}
nav{
text-align: center;
text-transform: uppercase;
font-family: "Arial";
font-size: 120%;
padding-bottom: 1%;
h2{
color: #424242;
background: #B3B3B3;
font-size: 150%;
summary{
font-style: normal;
color:#000000;
details{
font-style: oblique;
color: red;
}
footer{
background-color: #B3B3B3;
height: 100px;
clear: both;
.half{
width: 45%;
display: inline-block;
margin-right: 2%;
float: left;
img{
width: 75px;
nav a{
display: inline-block;
background-color: #FFFFFF;
color:#5e35b1;
width: 23%;
.new{
clear: both;
header, footer{
<!DOCTYPE html>
<html>
<head>
<!--
function WriteCookie() {
return;
cookievalue = escape(document.myform.customer.value) +
";";
//-->
</script>
</head>
<body>
</form>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
input{
input:focus{
background-color: #E6E6E6;
fieldset{
margin-bottom: 4%;
</style>
<script src="JS/billing.js"></script>
</head>
<body>
<h1>JavaScript Homework</h1>
<form>
<fieldset>
<legend>Shipping Information</legend>
<label for ="shippingName">Name:</label>
</fieldset>
<legend>Billing Information</legend>
</fieldset>
</form>
</body>
</html>
JavaScript
function billingFunction(){
if(document.getElementById('same').checked){
document.getElementById('billingName').value=document.getEl
ementById('shippingName').value;
document.getElementById('billingZip').value=document.getElem
entById('shippingZip').value;
else{
document.getElementById('billingName').value="";
document.getElementById('billingZip').value="";
}
Objective: To study loops in PHP.
While Loop
<?php
$max = 0;
echo $i = 0;
echo ",";
echo $j = 1;
echo ",";
$result=0;
$result = $i + $j;
$i = $j;
$j = $result;
$max = $max + 1;
echo $result;
echo ",";
?>
Do-While Loop
<?php
if ($handle)
do
$line = fgets($handle);
fclose($handle);
?>
For Loop
<?php
?>
For Each
<?php
echo $fruit;
echo "<br/>";
echo "<br/>";
?>
If
<?php
$age = 50;
?>
Else
<?php
$age = 50;
else
?>
Else If
<?php
$age = 50;
else
?>
Switch
<?php
$favourite_site = 'Code';
switch ($favourite_site) {
case 'Business':
break;
case 'Code':
break;
break;
case 'Music':
break;
case 'Photography':
break;
default:
?>
Objective: To study arrays in PHP.
<html>
<body>
<?php
$numbers[0] = "one";
$numbers[1] = "two";
$numbers[2] = "three";
$numbers[3] = "four";
$numbers[4] = "five";
?>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
</head>
<body>
<?php
// Define array
sort($colors);
print_r($colors);
?>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
</head>
<body>
<?php
// Define array
rsort($numbers);
print_r($numbers);
?>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
</head>
<body>
<?php
// Define array
asort($age);
print_r($age);
?>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
</head>
<body>
<?php
// Define array
arsort($age);
print_r($age);
?>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
</head>
<body>
<?php
// Define array
ksort($age);
print_r($age);
?>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
</head>
<body>
<?php
// Define array
krsort($age);
print_r($age);
?>
</body>
</html>
output
Objective: To study file handling in PHP.
Reading a file
<html>
<head>
</head>
<body>
<?php
$filename = "tmp.txt";
exit();
fclose( $file );
echo ( "<pre>$filetext</pre>" );
?>
</body>
</html>
Writing a file
<?php
$filename = "/home/user/guest/newfile.txt";
exit();
fclose( $file );
?>
<html>
<head>
</head>
<body>
<?php
$filename = "newfile.txt";
exit();
fclose( $file );
echo ( "$filetext" );
?>
</body>
</html>