HTML
HTML
1. write an html program to create and display navigation menus using list tags
and anchor tags
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<nav>
<ul>
<li><a href="#home">Home</a></li>
<li><a href="#about">About</a></li>
<li><a href="#services">Services</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</nav>
</body>
</html>
2. write an html program to display multimedia (text, images, audio, video, gifs
etc) on a webpage
<!DOCTYPE html>
<html>
<head>
<title>Multimedia Example</title>
</head>
<body>
<h2>Image Example</h2>
<h2>GIF Example</h2>
<h2>Audio Example</h2>
<audio controls>
</audio>
<!-- Video -->
<h2>Video Example</h2>
</video>
</body>
</html>
3. write an html program to demonstrate box model in CSS
<!DOCTYPE html>
<html>
<head>
<style>
.box {
width: 200px;
height: 100px;
background-color: #add8e6;
padding: 20px;
margin: 30px;
</style>
</head>
<body>
<div class="box">
This is a box!<br>
</div>
</body>
</html>
4. write an html program to create page loading animations
<!DOCTYPE html>
<html>
<head>
<style>
body {
background: #f0f0f0;
.container {
position: relative;
width: 300px;
height: 300px;
background: #fff;
overflow: hidden;
.ball {
position: absolute;
left: 130px;
top: 0;
width: 40px;
height: 40px;
background: #3498db;
border-radius: 50%;
animation: bounce 1s infinite alternate;
@keyframes bounce {
0% {
top: 0;
100% {
top: 240px;
</style>
</head>
<body>
<div class="container">
<div class="ball"></div>
</div>
</body>
</html>
Part b
1. write an html program to draw line, polyline and rectangle and fill rectangle
with red colour using svg tag
<!DOCTYPE html>
<html>
<head>
</head>
<body>
style="fill:gold;stroke:purple;stroke-width:4;" />
</svg>
</body>
</html>
3. write an html program to create a logo with linear gradient properties using
svg tag
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<script>
ctx.fillStyle = 'blue';
ctx.fillStyle = 'green';
</script>
</body>
</html>
5. write an html program to draw Bezier curve using canvas tag and java script
<!DOCTYPE html>
<html>
<head>
<title>Draw Bezier Curve with Canvas</title>
</head>
<body>
<h2>Bezier Curve Example</h2>
<canvas id="myCanvas" width="300" height="200" style="border:1px solid
#000000;"></canvas>
<script>
const canvas = document.getElementById('myCanvas');
const ctx = canvas.getContext('2d');
ctx.beginPath();
ctx.moveTo(30, 150);
ctx.stroke();
</script>
</body>
</html>