M A Lab Journal
M A Lab Journal
<html>
<body>
<form>
<h1>Logn Form</h1>
<label for="uname"><b>Username</b> </label>
<input type="text" placeholder="Enter Username" name="uname" required>
<br>
<br>
<br>
<label for="psw"><b>Password</b></label>
<input type="password" placeholder="Enter Password" name="psw" required>
<br>
<br>
<br>
<label>
<input type="checkbox" checked="checked" name="remember"> Remember me
</label>
<br>
<br>
<button type="submit">Login</button>
<button type="button" class="cancelbtn">Cancel</button>
<span class="psw">Forgot <a href="#">password?</a></span>
</form>
</body>
</html>
OUTPUT
Pgm2.html
<html>
<head>
<link rel="stylesheet" type="text/css" href="pgm2.css">
</head>
<body>
<div id="mainContent">
<img id="bigcloud" alt="Eror" class="cloud" height="170"
src="bigCloud.png"width="265">
<img id="smallcloud" alt="Eror" class="cloud" height="103"
src="smallCloud.png" width="158">
</div>
</body>
</html>
pgm2.css
#mainContent
{
background-color:aliceblue;
border-radius: 4px;
padding: 10px;
width: 600px;
height: 300px;
overflow: hidden;
}
.cloud
{
position: absolute;
}
#bigcloud
{
animation: bobble 2s infinite;
margin-left: 100px;
margin-top: 15px;
}
#smallcloud
{
margin-top: 35px;
margin-left: 200px;
}
@keyframes bobble
{
0% {
transform: translate3d(50px, 40px, 0px);
animation-timing-function: ease-in;
}
50% {
transform: translate3d(50px, 60px, 0px);
animation-timing-function: ease-out;
}
100% {
transform: translate3d(50px, 40px, 0px);
}
}
@keyframes bobbleways
{
0% {
transform: translate3d(50px, 40px, 30px);
animation-timing-function: ease-in;
}
50% {
transform: translate3d(50px, 80px, 40px);
animation-timing-function: ease-out;
}
100% {
transform: translate3d(50px, 40px, 30px);
}
}
Output:
<html>
<head>
<style>
div
{
width: 100px;
height: 100px;
background: red;
position: relative;
animation: mymove 5s infinite;
}
@keyframes mymove
{
0% {top: 0px; left: 0px; background: red;}
25% {top: 0px; left: 100px; background: blue;}
50% {top: 100px; left: 100px; background: yellow;}
75% {top: 100px; left: 0px; background: green;}
100% {top: 0px; left: 0px; background: red;}
}
</style>
</head>
<body>
<h1>The @keyframes Rule</h1>
<div></div>
</body>
</html>
Output:
OUTPUT:
</body>
</html>
OUTPUT:
6. Program to use table tag to format web page. Also, create the timetable of
your class using table tags.
<html>
<body>
<h1>TIME TABLE</h1>
<table border="5" cellspacing="0" align="center">
<tr>
<td align="center" height="50"
width="100"><br>
<b>Day/Period</b></br>
</td>
<td align="center" height="50"
width="100">
<b>I<br>9:30-10:20</b>
</td>
<td align="center" height="50"
width="100">
<b>II<br>10:20-11:10</b>
</td>
<td align="center" height="50"
width="100">
<b>III<br>11:10-12:00</b>
</td>
<td align="center" height="50"
width="100">
<b>12:00-12:40</b>
</td>
<td align="center" height="50"
width="100">
<b>IV<br>12:40-1:30</b>
</td>
<td align="center" height="50"
width="100">
<b>V<br>1:30-2:20</b>
</td>
<td align="center" height="50"
width="100">
<b>VI<br>2:20-3:10</b>
</td>
<td align="center" height="50"
width="100">
<b>VII<br>3:10-4:00</b>
</td>
</tr>
<tr>
<td align="center" height="50">
<b>Monday</b></td>
<td align="center" height="50">Animation</td>
<td align="center" height="50">Python</td>
<td align="center" height="50">OS</td>
<td rowspan="6" align="center" height="50">
<h2>L<br>U<br>N<br>C<br>H</h2>
</td>
<td colspan="3" align="center"
height="50">Python LAB</td>
<td align="center" height="50">OST</td>
</tr>
<tr>
<td align="center" height="50">
<b>Tuesday</b>
</td>
<td colspan="3" align="center"
height="50">Animation LAB
</td>
<td align="center" height="50">OST</td>
<td align="center" height="50">FEIA</td>
<td align="center" height="50">Python</td>
<td align="center" height="50">SPORTS</td>
</tr>
<tr>
<td align="center" height="50">
<b>Wednesday</b>
</td>
<td align="center" height="50">Animation</td>
<td align="center" height="50">OS</td>
<td align="center" height="50">Python</td>
<td align="center" height="50">OST</td>
<td colspan="3" align="center"
height="50">LIBRARY
</tr>
<tr>
</td></tr>
<tr>
</td>
<td align="center" height="50">SPORTS</td></tr>
</table>
</body>
</html>
OUTPUT:
OUTPUT:
PART-B
1. Program to Demonstrate SVG (Scalable Vector Graphics) Circle.
<html>
<body>
<h1>My first SVG</h1>
<svg width="100" height="100">
<circle cx="50" cy="50" r="40" stroke="green" stroke-width="4"
fill="yellow" />
</svg>
</body>
</html>
Output:
style="fill:lime;stroke:purple;stroke-width:2" />
</svg>
</body>
</html>
Output:
<html>
<head>
<title> Draw a Star Using SVG</title>
</head>
<body>
<svg width="2000" height="2000">
<polygon points="100,9 50,200 180,75 10,75 160,200"
style="fill:blue;stroke:red;stroke-width:5;fill-rule:evenodd;" />
</svg>
</body>
</html>
Output:
ctx.strokeStyle = gradient;
ctx.strokeText("Welcome to BCA Lab", 15, 100);
</script>
</body>
</html>
OUTPUT:
</script>
</head>
OUTPUT:
ctx.beginPath();
ctx.moveTo(25,25);
ctx.lineTo(105,25);
ctx.lineTo(25,105);
ctx.fillStyle="red"
ctx.fill();
ctx.beginPath();
ctx.moveTo(125,125);
ctx.lineTo(125,45);
ctx.lineTo(45,125);
ctx.closePath();
ctx.stroke();
} else
{
alert('You need Safari or Firefox 1.5+ to see this demo.');
}
}
</script>
</head>
<body id = "test" onload = "drawShape();">
<canvas id = "mycanvas"></canvas>
</body>
</html>
Output:
<html>
<head>
<style>
#test {
width:100px;
height:100px;
margin:0px auto;
}
</style>
<script type = "text/javascript">
function drawShape()
{
var canvas = document.getElementById('mycanvas');
if (canvas.getContext)
{
var ctx = canvas.getContext('2d');
var lingrad = ctx.createLinearGradient(0,0,0,150);
lingrad.addColorStop(0, '#00ABEB');
lingrad.addColorStop(0.5, '#fff');
lingrad.addColorStop(0.5, '#10BA09');
lingrad.addColorStop(1, '#fff');
var lingrad2 = ctx.createLinearGradient(0,50,0,95);
lingrad2.addColorStop(0.5, '#000');
lingrad2.addColorStop(1, 'rgba(0,0,0,0)');
ctx.fillStyle = lingrad;
ctx.strokeStyle = lingrad2;
ctx.fillRect(10,10,130,130);
ctx.strokeRect(50,50,50,50);
} else {
alert('You need Safari or Firefox 1.5+ to see this demo.');
}
}
</script>
</head>
Output:
<html>
<head>
<script type="application/javascript">
function init()
{
var canvas = document.getElementById("canvas");
if (canvas.getContext)
{
var ctx = canvas.getContext("2d");
ctx.textAlign="start";
ctx.fillStyle = "red";
ctx.font = "25px verdana";
ctx.shadowColor = "black";
ctx.shadowOffsetX = 2;
ctx.shadowOffsetY = 2;
ctx.fillText("Believe Shadow", 100,20);
ctx.shadowBlur = 3;
ctx.fillText("Believe Bevel", 100,60);
}
}
</script>
</head>
<body onload="init();">
<canvas id="canvas" width="900" height="500"></canvas><br>
</body>
</html>
Output:
ctx.globalCompositeOperation = compositeTypes[i];
<tr>
<td><canvas id = "tut3" width = "125" height =
"125"></canvas><br/>
<label id = "lab3"></label>
</td>
<tr>
<td><canvas id = "tut6" width = "125" height =
"125"></canvas><br/>
<label id = "lab6"></label>
</td>
"125"></canvas><br/>
<label id = "lab7"></label>
</td>
OUTPUT: