Download as pdf or txt
Download as pdf or txt
You are on page 1of 40

1) Write a program to create a online website for AP Tourism

AIM: create a online website for AP tourism


PROGRAM:
Top.html:
<html>

<head>

<title>top</title>

</head>

<body background="sunrise1.jpg">

<h1 style="color:red;font-weight:bold;text-align:center;">AP TOURISM</h1>

<marquee align="left">***Andhra Pradesh Tourism Development Corporation***</marquee>

<img src="Andhra-Pradesh-Tourism-Policy-2015.jpg" width="150" height="100" alt="AP


toursim" align="right">

<div style="color:purple;font-weight:bold;">

Welcome<br>

To Andhra Pradesh<br>

Tourism<br>

Official Website<br>

Toll Free : 1800-42-545454

</div>

<div align="center">

<a href="aboutus.html"><font color="blue">About


Us</font></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<a href="contactus.html"><font color="blue">Contact


Us</font></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<a href="booknow.html"><font color="blue">Book


Now</font></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<a href="exlplore.html"><font
color="blue">Explore</font></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

</div>

</body>
Aboutus.html
<html>

<head>

<title>AboutUs</title>

</head>

<body background="about-us2.jpg" height="900" width="1000">

<h1 style="color:red;font-weight:bold;text-align:center;">AP TOURISM</h1>

<div align="center">

<a href="top.html"><font color="blue">Home</font></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<a href="aboutus.html"><font color="blue">About


Us</font></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<a href="contactus.html"><font color="blue">Contact


Us</font></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

</div>

<p>

<b style="color:blue;font-weight:bold;"> Vision & Mission</b><br><br>

<b style="color:blue;">Vision</b><br>

<p>

Tourism is considered an engine of development and a catalyst to economic prosperity of a state.


Tourism not only refreshes the mind, but it also ushers happiness, relaxation, enjoyment and offers
a new experience etc. to the tourists.

It results in all round growth by means of an economic multiplier effect that percolates to various
stake-holders and other sectors such as airlines, railways, surface cruises, hotels etc.

The Vision of Andhra Pradesh tourism is to promote steady and sustained growth phase of the
travel and tourism sector in Andhra Pradesh making the destinations more accessible, more
attractive with many facilities and amenities for the tourists worldwide.

</p>

<b style="color:blue;">Vision Statement</b>

<p>

"To maintain its current position as the most sought-after tourism destination for an authentic,
luxurious, and personalized feel and experience of Andhra Pradesh for travelers from all regions."
Tourism is a major phenomenon in the modern society that has emerged as a successful economic
activity carrying immense global importance. There is hardly any other field of activity, which has
so many people involved directly or indirectly.

Tourism finds a niche for itself as an effective instrument in terms of generating employment,
earning revenue and foreign exchange, enhance environment, preserving culture and tradition
thereby resulting in overall development. Tourism is regarded as one of the world's largest and
fastest growing industries and Andhra Pradesh Tourism has grown by leaps and bounds over last
few years and is also gearing up to achieve significant progress in the field due to a many
encouraging factors.

Andhra Pradesh has vast geographical area combined with great historical and cultural heritage,
which are excellent conditions for more growth in this sector. The vision of Andhra Pradesh
tourism is to serve as a guiding force that offers a clear vision and direction for optimizing the
tourism potential of this state in a sustainable manner.

</p>

<b style="color:blue;">Mission</b>

<p>

According to Government of India estimates, every one crore that is invested in Tourism creates
475 jobs compared to 126 jobs from manufacturing sector, which proves the potential of this
sector.

</p>

<b style="color:blue;">Goals</b>

<ol type="circle">

<li>Make Andhra Pradesh travel and tourism more popular and attractive</li>

<li> Make the public gain more awareness regarding the importance and usefulness of travel and
tourism</li>

<li> Use more publicity to promote tourism destinations including the facilities and amenities
available</li>

<li> Develop the travel and tourism industry in Andhra Pradesh, making it more profitable and
competent</li>

<li> Promote eco-friendly and responsible tourism including a profit share to the local
population</li>

<li> Strengthen the existing tourism infrastructure in the Andhra Pradesh</li>

</p>

</body>

</html>
Contact us.html:
<html>

<head>

<title>contactus</title>

</head>

<body background="ContactUs1.png">

<h1 style="color:red;font-weight:bold;text-align:center;">AP TOURISM</h1>

<div align="center">

<a href="top.html"><font color="blue">Home</font></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<a href="aboutus.html"><font color="blue">About


Us</font></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<a href="contactus.html"><font color="blue">Contact


Us</font></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<p style="color:purple;font-weight:bold;text-align:center;font-size:35;">

Name: Samya Fazllema<br>

Email:samyashaik@gmail.com<br>

Phno:8686761643<br>

State:Andhra pradesh<br>

Country:India<br>

</p>

</body>

</html>
OUTPUT:
Output for top.html:

Output for aboutus.html:


Output for contactus.html:
2) Create a webpage in html describe your MCA department
a) Use paragraph and list tags
b) Apply various colors to distinguish keywords
c) Use header tags
d) Insert a image map and provide hotspots
e) At the bottom create a link to the user to top of the page
AIM: To demonstrate a webpage for MCA

PROGRAM:

mapping.html
<html>

<head>

<title>mapping</title>

</head>

<body>

<img src="MCA-banner.jpg" usemap="#MCA"/>

<map name="MCA">

<area href="F:\harika\webpage.html" target="_blank"

shape="square" coords="372,313,367,355">

</map>

</body>

</html>

Webpage.html
<html>

<head>

<title>mapping</title>

</head>

<body>

<img src="MCA-banner.jpg" usemap="#MCA"/>

<map name="MCA">
<area href="F:\harika\webpage.html" target="_blank"

shape="square" coords="372,313,367,355">

</map>

</body>

</html>
OUTPUT:
Output for mapping.html:

Output for webpage.html:


3) Write a program to demonstrate concept of formatting tags
AIM: To demonstrate concept of formatting tags

PROGRAM:

<html>

<head>

<title>using formating tags</title>

</head>

<body bgcolor="blue">

<h1 align="center"><font color="orange"><u>KBN INFO</u></font></h1>

<h2><font color="yellow">ABOUT US</font></h2>

<p>

<font type="arial" color="white" size="5">

<strong>

"Kakarparthi Bhavanarayana College with its four decades reputation has been leaving no stone
unturned to achieve the pre-set goal of transforming every student into a great leader by imparting
rich and qualitative education” . After establishing college in 1965 at vijayawada it bagged many
laurels to its credit and created many responsible citizens. Every educating student requires
attention to virtues, ethics, character and integrity.“The college had been sponsored by a century-
old society ... SKPVV Hindu High School's Committee “.

</strong>

</font>

</p>

<h2><font color="red" size="5">FACILITIES</font></h2>

<p>

<ul>

<font color="YELLOW" size="5">

<li type="disc">Well furnished classrooms.</li>

<li>Experienced faculties</li>

<li>Hostel facilities.</li>

<li>Book bank facility</li>

<li>College conducts state level quiz competition</li>


<li> Campus has gym and healthcare centre</li>

<li>Well equipped labs with modern technologies.</li>

<li>Spacious playground with indoor and outdoor sports facilities.</li>

<li>Parents can get to know their childrens attendance and academic performance through
phone.</li>

<li>The campus is monitored by CCTV system.</li>

<li>The college received 2nd Best Library award from Acharya Nagarjuna University.</li>

<li>Guest lectures and Industrial visits are arranged.</li>

<li>The college has NCC, NSS and other activities.</li>

<li>The library of KBN college is housed with huge collection of books, national and
international journals.</li>

</p>

</ul>

</font>

<h2><font type="Georgia" color="WHITE" size="5">PLACEMENTS</font></h2>

<font color="ORANGE" size="5">

<p>

<em>

Every year KBN college has conducting placements.so many companies are there and recurit the
students.companies are like:tcs,Tech mahindra,Accenture,hdfc bank,wipro,dell,muthoot,efftronics
etc.......

</em>

</p>

</font>

</body>

</html>
OUTPUT:
4) Write a Program demonstrate concept of tables
AIM: To demonstrate concept of tables
PROGRAM:
<html>

<head>

<title>Timetable</title>

</head>

<body>

<table align="center" border="3" >

<tr>

<td colspan="8" align="center" bgcolor="sky blue"><marquee behaviour="alternate">

<font color="yellow" size="5">IV SEM MCA TIME TABLE</font></marquee></td>

</tr>

<tr>

<th>DAYS/HOURS</th>

<th align="center">1</th>

<th align="center">2</th>

<th align="center">3</th>

<th rowspan="7" width="3%">

<b>B<br><br>R<br><br>E<br><br>A<br><br>K<br></b>

</font></td>

<th align="center">4</th>

<th align="center">5</th>

<th align="center">6</th>

</tr>

<tr>

<th>MONDAY</th>

<td align="center">Information<br> Security</td>

<td align="center">Artificial<br>Intelligence</td>
<td align="center">Web<br>Technology</td>

<td align="center">DAA</td>

<td align="center">OOAD</td>

<td align="center">Library</td>

</tr>

<tr>

<th>TUESDAY</th>

<td align="center">DAA</td>

<td align="center">OOAD</td>

<td align="center">Web<br>Technology</td>

<td align="center">Information<br>Security</td>

<td align="center" colspan="2" align="center">----SE Lab----</td>

</tr>

<tr>

<th>WEDNESDAY</th>

<td align="center">Information<br>Security</td>

<td align="center">Artificial<br>Intelligence</td>

<td align="center">Web<br>Technology</td>

<td align="center">OOAD</td>

<td align="center" colspan="2" align="center">---Web Technology Lab---</td>

</tr>

<tr>

<th>THURSDAY</th>

<td align="center">DAA</td>

<td align="center">OOAD</td>

<td align="center">Web<br>Technology</td>

<td align="center">Artificial<br>Intelligence</td>

<td align="center">Information<br>Security</td>

<td align="center">Seminar</td>
</tr>

<tr>

<th>FRIDAY</th>

<td align="center">DAA</td>

<td align="center" colspan="2" align="center">---Web Technology Lab---</td>

<td align="center">Information<br>Security</td>

<td align="center">Communication<br>skills</td>

<td align="center">OOAD</td>

</tr>

<tr>

<th>SATURDAY</th>

<td align="center">OOAD</td>

<td align="center">Artificial<br>Intelligence</td>

<td align="center">DAA</td>

<td align="center" colspan="3" align="center">----SE Lab----</td>

</tr>

</table>

</body>

</html>
OUTPUT:
5) Write a javascript to print Armstrong numbers upto n
AIM: To demonstrate Armstrong numbers

PROGRAM:
<html>

<head><title>amstrong</title>

<script language="javascript">

function amstrong(n)

var temp,r,sum;

sum=0;

temp=n;

while(n>0)

r=n%10;

sum=sum+(r*r*r);

n=parseInt(n/10);

if(temp==sum)

document.writeln("<br>" +sum);

</script>

</head>

<body>

<script language="javascript">

var n,i;

n=parseInt(window.prompt("Enter n value"));

for(i=0; i<=n;i++)

amstrong(i);

</script>
</body>

</html>
OUTPUT:
1
153
370
371
407
6) Write a javascript to perform event handling
AIM: To demonstrate a concept of event handling

PROGRAM:
<html>

<head>

<title>Event Handling </title>

</head>

<body onLoad='alert("This is Event Handling Program")'>

<h1 align="center"> Event handling </h1>

<ul>

<br><li> onClick Event:

<input type="button" value="Click here" onClick='alert("Clicked")'><br><br>

<li> onDblClick Event :

<input type="button" value="Double click here" onDblClick='alert("Double Clicked")'><br><br>

<li> onFocus Event:

<input type="text" value="click here" onFocus='alert("Focus gained")'><br><br>

<li> onChange Event:

<input type="text" value="alter the text here" size="20" onChange='alert("changed")'><br><br>

<li> onReset Event :

<form onReset='alert("This will reset the form!")'>

<input type="text">

<input type="reset" value="reset">

</form>

<li> onSelect Event :

<input type="text" value="select me" size="20" onSelect='alert("Text Selected")'><br><br>

<li> onMouseover :

<br> put your mouse over <a href="www.gmail.com" onMouseover="window.status='hi this is


Sudhakar';return true">here</a>and look at the status bar<br><br>

<li> onMouseOut
<br> Put your Mouse Out<a href="www.gmail.com"onMouseOut="window.status='you left the
link!';return true">here</a>and then take mouse pointer away<br><br>

<li> on Submit event :

<form onSubmit='alert("submitted")'>

<input type="text">

<input type="submit" value="submit">

</form>

<br>

<br>

</ul>

</body>

</html>
OUTPUT:
7) Write a javascript to perform string functions
AIM: To demonstrate string functions
PROGRAM
<html>

<head><title>String Functions</title>

</head>

<body bgcolor="yellow">

<h1 align="center"> String Functions </h1>

<h4>

<script language="javascript">

var str=new String("This is a String Function Program");

document.writeln("charAt(0) is "+str.charAt(0));

var index=str.indexOf("Program");

document.writeln("<br> Index of Program is : " +index);

index=str.lastIndexOf("is");

document.writeln("<br> Index of is :" +index);

str1="Apple,Banana are good for Health";

var split_str=str1.split(" ",3);

document.writeln("<br> The Splitted elements are :" +split_str);

document.writeln("<br> substring(1,2) is " +str.substr(1,2));

document.writeln("<br> substring(1,3) is " +str.substr(1,3));

document.writeln("<br> Uppercase elements is: "+str.toUpperCase(str1));

document.writeln("<br> Lowercase elements is: " +str.toLowerCase(str1));

</script>

</h4>

</body>

</html>
OUTPUT:
charAt(0) is T
Index of Program is : 26
Index of is :5
The Splitted elements are :Apple,Banana,are,good
substring(1,2) is hi
substring(1,3) is his
Uppercase elements is: THIS IS A STRING FUNCTION PROGRAM
Lowercase elements is: this is a string function program
8) Write a program to demonstrate concept of CSS
AIM: To demonstrate a concept of CSS

PROGRAM: external.css
<html>

<head>

<title>ecss</title>

<link rel="stylesheet" type="text/css" href="ex.css">

</head>

<body>

<h1><center>External style sheets</center></h1>

<p>web technologies that relate to the interface between web servers and their clients.

This information includes markup languages, programming interfaces and languages,

and standards for document identification and display.</p>

<p>CSS is a stylesheet language that describes the presentation of an HTML (or XML) document.

CSS describes how elements must be rendered on screen, on paper, or in other media.

This tutorial will teach you CSS from basic to advanced.</p>

<p>Cascading Style Sheets (CSS) is a simple mechanism for adding style (e.g., fonts, colors,
spacing) to Web documents. These pages contain information on how to learn and use CSS and on
available software. They also contain news from the CSS working group. </p>

</body>

</html>
OUTPUT:
INLINE.CSS:

<html>

<head>

<title>Inline</title>

</head>

<body style="background_color:black;">

<p style="font-size:20; color:purple; text-align:center;">Login</p>

<form name="f1">

<table align="center">

<tr>

<td style="color:black;font-weight:bold;">User Name:</td>

<td><input type="text" name="uname" style="color:red;font-family:impact;"></td>

</tr>

<tr>

<td style="color:black;font-weight:bold;">password:</td>

<td><input type="password" name="pwd" style="color:red;font-family:impact;"></td>

</tr>

<tr>

<td><input type="submit" value="submit" style="color:green;"></td>

<td><input type="reset" value="reset" style="color:green;"></td>

</tr>

</table>

</form>

</body>

</html>
OUTPUT:
EMBEDDED.CSS:

<html>

<head>

<title>Embeded CSS</title>

<style>

body{background-color:purple;}

#n1{color:red;}

.n2{color:blue;}

</style>

</head>

<body>

<p align="center">Login</p>

<table align="center">

<tr>

<td id="n1">User name:</td>

<td><input type="text" class="n2"></td>

</tr>

<tr>

<td id="n1">password:</td>

<td><input type="password" class="n2"></td>

</tr>

<tr>

<td><input type="submit" value="Submit"</td>

<td><input type="Reset" value="reset"></td>

</tr>

</table>

</body>

</html>
OUTPUT:
9) Write a program for date object
AIM: To demonstrate a concept of date object

Program:

<html>

<head>

<script language="javascript">

function hours()

var a=new Date();

var hours=a.getHours();

if(hours>=5&&hours<12)

document.writeln("Good morning");

else if(hours>=12&&hours<17)

document.writeln("Good afternoon");

else if(hours>=17&&hours<21)

document.writeln("Good evening");

else

document.writeln("Good night");

</script>

</head>

<body>

<script language="javascript">

hours();

</script>

</body>

</html>
OUTPUT:

Good Morning

Good aftrnun

Good evening

Good night
10) Write a program for sorting of arrays
AIM: To demonstrate a concept of sorting arrays

PROGRAM:
<html>

<head>

<title>Sorting</title>

</head>

<body>

<script language="javascript">

var i,j,n,t;

var a=new Array(5);

n=parseInt(window.prompt("enter n value"));

for(i=0;i<n;i++)

a[i]=parseInt(window.prompt("enter a value"));

for(i=0;i<n;i++)

for(j=i+1;j<n;j++)

if(a[i]>a[j])

t=a[i];

a[i]=a[j];

a[j]=t;

for(i=0;i<n;i++)

document.writeln("<br>"+a[i]);

</script>

</body>
</html>

OUTPUT:

Given values are: 9,3,1,2,8

output:

9
11)Write a php program using session variables
AIM: To set session variables in php and access session variables

PROGRAM: DEMO1.PHP

//To set session variables//


<html>

<body>

<?php

// Start the session

session_start();

?>

<!DOCTYPE html>

<html>

<body>

<?php

// Set session variables

$_SESSION["favcolor"] = "green";

$_SESSION["favanimal"] = "cat";

echo "Session variables are set.";

?>

</body>

</html>

PROCESS FOR PHP EXECUTION:

1) Write php program in notepad


2) Save file as demo1.php in C:\xampp\htdocs as “All files”
3) Open internet explorer type in address field as ” http://localhost:8088/demo1.php”
OUTPUT SCREEN:
DEMO2.PHP

//Display of session variables//


<html>

<body>

<?php

session_start();

?>

<!DOCTYPE html>

<html>

<body>

<?php

// Echo session variables that were set on previous page

echo "Favorite color is " . $_SESSION["favcolor"] . ".<br>";

echo "Favorite animal is " . $_SESSION["favanimal"] . ".";

?>

</body>

</html>

PROCESS FOR PHP EXECUTION:

4) Write php program in notepad


5) Save file as demo1.php in C:\xampp\htdocs as “All files”
6) Open internet explorer type in address field as ” http://localhost:8088/demo2.php”
OUTPUT SCREEN:
12) Write a program in php to demonstrate cookies
AIM: To set a new cookie in PHP
PROGRAM:

<html>

<body>

<?php

$cookie_name = "user";

$cookie_value = "HARRY POTTER";

setcookie($cookie_name, $cookie_value, time() + (86400 * 30), "/");

?>

<html>

<body>

<?php

if(!isset($_COOKIE[$cookie_name])) {

echo "Cookie named '" . $cookie_name . "' is not set!";

} else {

echo "Cookie '" . $cookie_name . "' is set!<br>";

echo "Value is: " . $_COOKIE[$cookie_name];

?>

</body>

</html>
OUTPUT:

You might also like