AITpractical 180
AITpractical 180
AITpractical 180
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Schedule</title>
<link href="https://fonts.googleapis.com/css?family=Roboto:400,500,700&display=swap"
rel="stylesheet">
</head>
<style>
body {
margin: 0;
padding: 0;
.min-h-screen {
min-height: 100vh;
.bg-gray-100 {
background-color: #f7fafc;
.p-8 {
padding: 2rem;
}
.overflow-x-auto {
overflow-x: auto;
.min-w-full {
min-width: 100%;
.bg-white {
background-color: #fff;
.border-b {
.text-left {
text-align: left;
.p-4 {
padding: 1rem;
.font-medium {
font-weight: 500;
}
</style>
<body>
<div class="overflow-x-auto">
<thead class="border-b">
<tr>
</tr>
</thead>
<tbody>
<tr class="border-b">
<td class="p-4">Monday</td>
<td class="p-4">OC4</td>
<td class="p-4">-</td>
<td class="p-4">SPM</td>
<td class="p-4">ADBMS</td>
<td class="p-4">-</td>
<tr class="border-b">
<td class="p-4">Tuesday</td>
<td class="p-4">OT</td>
<td class="p-4">AIT</td>
<td class="p-4">SPM</td>
<td class="p-4">LUNCH</td>
</tr>
<tr class="border-b">
<td class="p-4">Wednesday</td>
<td class="p-4">OC3</td>
<td class="p-4">SPM</td>
<td class="p-4">-</td>
</tr>
<tr class="border-b">
<td class="p-4">Thursday</td>
<td class="p-4">AIT</td>
<td class="p-4">OT</td>
<td class="p-4">ADBMS</td>
<tr class="border-b">
<td class="p-4">Friday</td>
<td class="p-4">ADBMS</td>
<td class="p-4">AIT</td>
<td class="p-4">OT</td>
<td class="p-4">ADBMS</td>
</tr>
<tr class="border-b">
<td class="p-4">Saturday</td>
<td class="p-4">-</td>
</tr>
</tbody>
</table>
</div>
</div>
</body>
</html>
Output:
Q2.Design the following web page by using HTML5 and CSS3.Using Client side image mapping
display following Output. After image click show the health benefits of fruits page
respectively.
a.Change the background color, font and font size and color of text. And display at center in
header b. Change color of footer and write given tex
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Fruits</title>
</head>
<style>
body {
background-color: #f2f2f2;
margin: 0;
}
header {
background-color: #333;
color: #fff;
text-align: center;
padding: 20px;
font-size: 2em;
nav {
text-align: center;
img {
width: 700px;
height: 400px;
footer {
background-color: #333;
color: #fff;
text-align: center;
padding: 20px;
</style>
<body>
<header>
<h1>Fruits</h1> </header>
<nav>
<map name="image-map">
</map>
</nav>
<footer>
</footer>
</body>
</html>
Output:
<html lang="en">
<head>
<meta charset="UTF-8">
</head>
<body>
</svg>
<script>
// Draw background
ctx.fillStyle = '#ddd';
ctx.fillStyle = 'red';
ctx.fill();
ctx.beginPath();
ctx.fillStyle = 'yellow';
ctx.fill();
ctx.beginPath();
ctx.fillStyle = 'green';
ctx.fill();
</script>
</body>
</html>
Output:
Q4 Show the following output using Canvas and SVG example
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
</head>
<body>
</svg>
<script>
ctx.fillStyle = 'yellow';
// Draw Roof
ctx.beginPath();
ctx.moveTo(100, 200);
ctx.lineTo(300, 200);
ctx.lineTo(200, 100);
ctx.closePath();
ctx.fillStyle = 'blue';
ctx.fill();
// Draw Windows
ctx.fillStyle = 'orange';
// Draw Door
// Draw Trees
// Draw trunk
context.fillStyle = 'brown';
// Draw leaves
context.beginPath();
context.moveTo(x, y);
context.closePath();
context.fillStyle = 'green';
context.fill();
</script>
</body>
</html>
Output:
Q5 Program to design form using HTML5 elements, attributes and Semantics for your web
page Program to design form using HTML5 elements, attributes and Semantics for your web
page
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
</head>
<body>
<h1>Contact Us</h1>
<div>
<label for="name">Name:</label>
</div>
<div>
<label for="email">Email:</label>
</div>
<div>
<label for="message">Message:</label>
</div>
<div>
</div>
</form>
</body>
</html>
Output:
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Olympic Rings</title>
</head>
<body>
<script>
ctx.fillStyle = 'white';
ctx.fillRect(0, 0, canvas.width, canvas.height);
const circleProps = [
];
// Draw circles
circleProps.forEach(circle => {
ctx.beginPath();
ctx.fillStyle = circle.color;
ctx.fill();
ctx.closePath();
});
// Draw rings
ctx.lineWidth = 8;
ctx.strokeStyle = 'white';
circleProps.forEach(circle => {
ctx.beginPath();
ctx.stroke();
ctx.closePath();
});
</script>
</body>
</html>
Output:
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Shapes Stack</title>
</head>
<body>
<polygon points="200,220 215,255 255,255 225,275 240,310 200,280 160,310 175,275 145,255
185,255" fill="yellow"/>
</svg>
<script>
// Draw line
ctx.beginPath();
ctx.moveTo(50, 50);
ctx.lineTo(350, 50);
ctx.strokeStyle = 'black';
ctx.lineWidth = 2;
ctx.stroke();
// Draw rectangle
ctx.fillStyle = 'brown';
// Draw circle
ctx.beginPath();
ctx.fillStyle = 'yellow';
ctx.fill();
// Draw star
ctx.beginPath();
ctx.moveTo(200, 220);
ctx.lineTo(215, 255);
ctx.lineTo(255, 255);
ctx.lineTo(225, 275);
ctx.lineTo(240, 310);
ctx.lineTo(200, 280);
ctx.lineTo(160, 310);
ctx.lineTo(175, 275);
ctx.lineTo(145, 255);
ctx.lineTo(185, 255);
ctx.closePath();
ctx.fillStyle = 'yellow';
ctx.fill();
</script>
</body>
</html>
Output:
Q8. Programs using Canvas and SVG.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Faces</title>
</head>
<body>
<path d="M80 120 Q100 140 120 120" stroke="black" fill="transparent" stroke-width="4"/>
</svg>
<script>
ctx.beginPath();
ctx.fillStyle = 'yellow';
ctx.fill();
ctx.closePath();
ctx.beginPath();
ctx.fillStyle = 'black';
ctx.fill();
ctx.closePath();
ctx.beginPath();
ctx.moveTo(80, 120);
ctx.strokeStyle = 'black';
ctx.lineWidth = 4;
ctx.stroke();
ctx.closePath();
// Angry Face
ctx.beginPath();
ctx.fillStyle = 'orange';
ctx.fill();
ctx.closePath();
ctx.beginPath();
ctx.moveTo(270, 80);
ctx.lineTo(290, 100);
ctx.moveTo(330, 80);
ctx.lineTo(310, 100);
ctx.moveTo(270, 130);
ctx.lineTo(330, 130);
ctx.strokeStyle = 'black';
ctx.lineWidth = 4;
ctx.stroke();
ctx.closePath();
</script>
</body>
</html>
Q9. Write a Program to design web page using HTML5 elements, attributes and Semantics
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
body {
margin: 0;
padding: 0;
}
.container {
padding: 20px;
.card {
border-radius: 8px;
overflow: hidden;
.card-header {
padding: 20px;
text-align: center;
.card-body {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
padding: 20px;
.image {
width: 100%;
max-height: 400px;
.text {
padding: 0 10px;
.advertisement {
margin-top: 20px;
.footer {
text-align: center;
margin-top: 20px;
font-size: 14px;
</style>
</head>
<body>
<div class="container">
<div class="card">
<div class="card-header">
</div>
<div class="card-body">
<div class="image">
<img src="https://oaidalleapiprodscus.blob.core.windows.net/private/org-
Z4nfEDaxRZMLLsvkUtarndlT/user-HEQW8znOgvSHX0At9Wit8Qry/img-
G290sxk87l11bbwbN4cqGPqg.png?st=2024-02-11T12%3A43%3A59Z&se=2024-02-
11T14%3A43%3A59Z&sp=r&sv=2021-08-
06&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-
684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2024-02-
11T09%3A41%3A05Z&ske=2024-02-12T09%3A41%3A05Z&sks=b&skv=2021-08-
06&sig=iQ2JkHCWrPS4A7F7ALHs/xMSKNtrYwifhaDiyNTVZpU%3D" alt="Balloons and confetti with
text Birthday Wishes, Messages, Quotes, & Greetings" class="w-full h-auto">
</div>
<div class="text">
<p class="text-gray-600">Create your own Greeting using CSS properties like background text
etc</p>
</div>
</div>
<div class="advertisement">
</div>
<div class="footer">
</div>
</div>
</div>
</body>
</html>
Output:
Q10. Write CSS code for creating following External Style Sheet and link to HTML
page.
d) Apply border for division tag (left side: dotted, right side: dashed top: double
bottom: Single)
f) In paragraph each word first letter must be in capital letters rest all in small case.
index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Styling Example</title>
</head>
<body>
<div>Border Applied: Left (dotted), Right (dashed), Top (double), Bottom (solid)</div>
</body>
</html>
style.css
h1 {
background-color: red;
h1 {
color: white;
}
/* c) Text with 18px font-size, italic, and underline */
.text-styling {
font-size: 18px;
font-style: italic;
text-decoration: underline;
div {
a{
text-decoration: none;
p{
text-transform: capitalize;
.text-effect {
font-size: 24px;
color: blue;
body {
background-color: blue;
h1 {
background-color: aqua;
p{
white-space: normal;
body {
margin: 2in;
padding: 2in;
img {
transform: rotate(15deg);
}
Q11.Design Webpage using HTML5 and CSS3
index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
</head>
<body class="bg-orange-100">
</h1>
</header>
</nav>
<div class="mb-6">
</div>
</div>
<div class="text-lg">
</ul>
</div>
</div>
</body>
</html>
style.css
body {
.text-center {
text-align: center;
.bg-black {
background-color: black;
.text-white {
color: white;
.bg-orange-100 {
background-color: #FBD38D;
.flex {
display: flex;
.justify-center {
justify-content: center;
.space-x-4 > * + * {
margin-left: 1rem;
.py-3 {
padding-top: 0.75rem;
padding-bottom: 0.75rem;
.border-dashed {
border-style: dashed;
.border-4 {
border-width: 4px;
.border-gray-400 {
border-color: #CBD5E0;
.mb-6 {
margin-bottom: 1.5rem;
.fa-volume-up, .fa-video {
font-size: 2rem;
.text-lg {
font-size: 1.125rem;
.list-decimal {
list-style-type: decimal;
.list-inside {
list-style-position: inside;
Output:
Q12.Design Webpage using HTML5 and CSS3
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
body {
background-color: #edf2f7;
padding: 32px;
.container {
max-width: 600px;
margin: 0 auto;
background-color: #ffffff;
padding: 24px;
.heading {
text-align: center;
font-size: 24px;
font-weight: bold;
margin-bottom: 16px;
}
.image-container {
display: flex;
justify-content: flex-end;
margin-bottom: 24px;
.image-container img {
width: 96px;
height: 96px;
.details {
font-weight: bold;
margin-bottom: 16px;
.details-grid {
display: grid;
gap: 16px;
.documents {
margin-bottom: 16px;
}
.documents ul {
list-style-type: none;
padding-left: 0;
.documents ul li {
margin-bottom: 8px;
.school-certify {
margin-bottom: 16px;
</style>
</head>
<body>
<div class="container">
<div class="image-container">
<img src="https://oaidalleapiprodscus.blob.core.windows.net/private/org-
Z4nfEDaxRZMLLsvkUtarndlT/user-HEQW8znOgvSHX0At9Wit8Qry/img-
FMKcEqLfageqyTTZmpjRpbG5.png?st=2024-02-11T13%3A03%3A24Z&se=2024-02-
11T15%3A03%3A24Z&sp=r&sv=2021-08-
06&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-
684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2024-02-
11T13%3A51%3A09Z&ske=2024-02-12T13%3A51%3A09Z&sks=b&skv=2021-08-
06&sig=GaTW1r1LDSnUxwktVXxvuH%2BuYNNMwcjEn%2BqNrLUcm30%3D" alt="Placeholder for
recent photo">
</div>
<div class="details">
<h2>DETAILS OF ORPHAN</h2>
<div class="details-grid">
<div>Name: ______________________________________________________</div>
<div>Male/Female: _______________ Birth Place ____________________</div>
</div>
</div>
<div class="details">
<h2>DETAILS OF PARENTS/GUARDIAN</h2>
<div class="details-grid">
<div>Father's Name_______________________________________________</div>
<div>Mother's Name:______________________________________________</div>
</div>
</div>
<div class="details">
<div class="documents">
<ul>
<li>Mother's ID Copy</li>
</ul>
</div>
</div>
<div class="school-certify">
</div>
</div>
</body>
</html>
Output:
Q 13. Design the web page using HTML5 and CSS3 semantic elements
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap"
rel="stylesheet">
<style>
body {
background-color: #f0f4f8;
.container {
max-width: 768px;
margin: 0 auto;
padding: 32px;
.bg-white {
background-color: #ffffff;
padding: 24px;
.border-b-4 {
border-bottom-width: 4px;
border-bottom-style: solid;
border-bottom-color: #1a365d;
padding-bottom: 2px;
margin-bottom: 6px;
.text-blue-800 {
color: #1a365d;
.text-5xl {
font-size: 2.5rem;
.col-span-2 {
grid-column: span 2;
.mb-4 {
margin-bottom: 16px;
.mb-2 {
margin-bottom: 8px;
}
.text-2xl {
font-size: 1.5rem;
font-weight: bold;
margin-bottom: 8px;
.border-t-2 {
border-top-width: 2px;
border-top-style: solid;
border-top-color: #1a365d;
padding-top: 2px;
margin-top: 6px;
.text-xl {
font-size: 1.25rem;
font-weight: bold;
margin-bottom: 4px;
.rounded-full {
border-radius: 50%;
.mr-2 {
margin-right: 8px;
}
.text-lg {
font-size: 1.125rem;
font-weight: bold;
margin-bottom: 4px;
.text-sm {
font-size: 0.875rem;
</style>
</head>
<body class="bg-blue-100">
<div class="container">
<div class="bg-white">
<div class="border-b-4">
</div>
<div class="col-span-2">
</div>
<p class="text-lg mb-4">From lucrative deals to international opportunities, it's not all work
and cubicles for students today</p>
<h3 class="text-xl font-bold mb-2">Sourav Dutta | Hitting Targets, Despite The Pain</h3>
<p class="text-lg">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation
ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</div>
</div>
<div class="space-y-4">
<div>
</div>
</div>
<div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
Output:
Q14 Write a Program to design web page using HTML5 elements, attributes and Semantics
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
body {
background-color: #edf2f7;
margin: 0;
padding: 0;
}
header {
padding: 1rem;
background-color: #90cdf4;
.animated-text {
@keyframes textAnimation {
.flex {
display: flex;
.flex-col {
flex-direction: column;
.h-screen {
height: 100vh;
.p-4 {
padding: 1rem;
}
.text-center {
text-align: center;
.bg-blue-300 {
background-color: #90cdf4;
.bg-blue-100 {
background-color: #edf2f7;
.grid {
display: grid;
.grid-cols-3 {
.gap-4 {
gap: 1rem;
.col-span-2 {
grid-column: span 2;
}
.bg-white {
background-color: #ffffff;
.border-2 {
border-width: 2px;
border-style: solid;
.border-black {
border-color: #000000;
.mb-4 {
margin-bottom: 1rem;
.mb-2 {
margin-bottom: 0.5rem;
.w-6 {
width: 1.5rem;
.h-6 {
height: 1.5rem;
}
.rounded-full {
border-radius: 9999px;
.mr-2 {
margin-right: 0.5rem;
ul {
list-style-type: none;
padding: 0;
li {
margin-bottom: 0.5rem;
display: flex;
align-items: center;
span {
font-size: 0.875rem;
</style>
</head>
<body class="bg-blue-100">
<h2 class="text-lg mb-4">Create your own Greeting using Css properties like background text
properties etc</h2>
<ul>
<li>
<span>Ease-in</span>
</li>
<li>
<span>Ease-out</span>
</li>
<li>
<span>Linear</span>
</li>
<li>
<span>Ease</span>
</li>
<li>
<span>Ease-in-out</span>
</li>
</ul>
</div>
<p class="text-center">Advertisement</p>
</div>
</div>
</div>
</div>
<p>Add footer</p>
</footer>
</div>
</body>
</html>
Output:
Q15 Programs to demonstrate external and internal styles in the web page using font,
text,background, borders, opacity and other CSS 3 properties
index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>House Design</title>
</head>
<body>
<div class="house">
<div class="roof"></div>
<div class="sun"></div>
<div class="chimney"></div>
<div class="window"></div>
<div class="window"></div>
<div class="door"></div>
</div>
</body>
</html>
style.css
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
.house {
position: relative;
width: 200px;
height: 200px;
background-color: green;
.roof {
width: 0;
height: 0;
position: absolute;
top: -100px;
left: 0;
.sun {
width: 50px;
height: 50px;
background-color: yellow;
border-radius: 50%;
position: absolute;
top: -25px;
left: 75px;
.chimney {
width: 20px;
height: 50px;
background-color: brown;
position: absolute;
top: -150px;
left: 90px;
.window {
width: 40px;
height: 40px;
background-color: white;
border: 2px solid black;
position: absolute;
top: 70px;
.window:nth-child(1) {
left: 30px;
.window:nth-child(2) {
right: 30px;
.door {
width: 60px;
height: 100px;
background-color: blue;
position: absolute;
bottom: 0;
left: 70px;
Output