Pooja
Pooja
Roll no-50
Section -C2
Q8- write an html code to demonstrate the use of audio and video tag using html
Code:-
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Audio and Video Demo</title>
</head> <style>
h2,video,audio{
margin-left: 42%;
}
</style>
<body>
<div class="audio">
<h2>Audio Example</h2>
<audio controls>
<source src="example_audio.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
</div>
<div class="video">
<h2>Video Example</h2>
<video controls width="400" height=">
<source src="example_video.mp4" type="video/mp4">
Your browser does not support the video element.
</video> </div>
</body>
</html>
NAME-Neema Raikhola
Roll no-44
Section -C2
OUTPUT:-
NAME-Neema Raikhola
Roll no-44
Section -C2
Code:-
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Frames and Images Example</title>
</head>
<body>
<!--
<h2>Frameset Example</h2>
<h2>Image Example</h2>
<img src="example_image.jpg" alt="Example Image" width="300" height="200">
</body>
NAME-Neema Raikhola
Roll no-44
Section -C2
</html>
Output:-
NAME-Neema Raikhola
Roll no-44
Section -C2
Q10:- Write an html code for the below login page: Using internal CSS.
Code:-
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>log-in</title>
<link href='https://unpkg.com/[email protected]/css/boxicons.min.css' rel='stylesheet'>
</head> <style> body{
background-color: rgb(10, 95, 151);
justify-content: center; align-items:
center; display: flex;
} .login{ background-color:
aliceblue; border-radius: 5%;
border: 5px solid ; border-
color:rgb(10, 77, 105) ;
}
h3{
text-align: center ;
font-size: larger; color:
rgb(18, 118, 99);
} .login{ border-radius: 5%;
border: 5px solid ; border-
color:rgb(10, 77, 105) ;
NAME-Neema Raikhola
Roll no-44
Section -C2
} label{ margin-left:
20px; } input{
margin-right: 20px;
padding-right: 20px;
} a{ margin-left: 23px;
color: red; text-
decoration: none;
} button{ font-size: medium;
height: 21px; color: aliceblue;
background-color: rgb(12, 126, 160);
border: 1px solid black; margin-
bottom: 10px;
margin-left: 20px;
} p{ color: white; background-
color: rgb(23, 66, 89); text-align:
center; border-radius: 5px;
} section i{ position: relative;
height: 19px; right: 4px; border-
radius: 0px 3px 3px 0px ; border: 1px
solid; background-color: rgb(25, 184,
224);
}
</style>
<body>
<form>
<div class="login">
<h3>LOGIN</h3><hr>
<div class="user">
<label for="user">Username:</label><br>
NAME-Neema Raikhola
Roll no-44
Section -C2
OUTPUT:-
NAME-Neema Raikhola
Roll no-44
Section -C2
Q11:- Write an HTML code to demonstrate the use of hover selector with <a> tag using
CSS.
Code:-
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Hover Selector Example</title>
<style> body{
display: flex; align-
items: center; justify-
content: center; } a {
NAME-Neema Raikhola
Roll no-44
Section -C2
OUTPUT:-
Q12:- Write an HTML code to display a drop down menu (list) on mouse over event
(using hover selector) on the web page like:
Code:-
<!DOCTYPE html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head> <style> ul{ list-
style: none; background-
color: black; color:
aliceblue; } ul li { display:
inline-block; padding:
10px; } ul li:hover{
NAME-Neema Raikhola
Roll no-44
Section -C2
background-color: green;
color: white; }
.dropdown{display: none;
} ul li:hover .dropdown
{ display: block;
position: absolute;
margin-left: 0.29cm;
margin-top: 0.27cm; }
.dropdown ul li{
display: block; }
.dropdown ul{
margin: 0;
padding: 0; }
</style>
<body>
<ul>
<li> home</a></li> <li>languages
<div class="dropdown">
<ul>
<li>html</a></li>
<li>css</a></li>
<li> Javascript</a></li>
</ul> </div>
</li>
<li>about</a></li>
</ul>
</body>
</html>
NAME-Neema Raikhola
Roll no-44
Section -C2
OUTPUT:-
Q13:- Write an HTML code to design a web page similar to “facebook.com” front page.
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Facebook Login Page</title>
<link rel="stylesheet" href="./login_form_2.css" />
</head>
<body>
<style>
@import
url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,50
0;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap
"); * { margin: 0;
padding: 0; box-sizing:
border-box;
} body { font-family: "Poppins",
sans-serif; background: #f2f4f7;
NAME-Neema Raikhola
Roll no-44
Section -C2
none; background:
#1877f2; padding:
0.8rem 1rem; border-
radius: 0.4rem; font-
size: 1.1rem; color:
#fff; } form a { text-
decoration: none; text-
align: center; font-size:
1rem; padding-top:
0.8rem; color:
#1877f2; } form
.create-account {
outline: none; border:
none; background:
#06b909; padding:
0.8rem 1rem; border-
radius: 0.4rem; font-
size: 1.1rem; color:
#fff; width: 75%;
margin: 0 auto; }
.name-content {
margin: 0; text-
align: center; }
</style>
<div class="content">
<div class="flex-div"> <div class="name-content">
<h1 class="logo">Facebook</h1>
<p>Connect with friends and the world around you on Facebook.</p>
</div>
NAME-Neema Raikhola
Roll no-44
Section -C2
<form>
<input type="text" placeholder="Email or Phone Number" required />
<input type="password" placeholder="Password" required>
<button class="login">Log In</button>
<a href="#">Forgot Password ?</a>
<button class="create-account">Create New Account</button>
</form>
</div>
</div>
</body>
</html>
Output:-
NAME-Neema Raikhola
Roll no-44
Section -C2
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<style>
body{
display: flex; justify-content:
center; align-items: center;
} div label{
margin-right: 0;
padding-right:0 ;
NAME-Neema Raikhola
Roll no-44
Section -C2
<label for="state">state</label>
<select id="state">
<option value="Gujrat">Gujrat</option>
<option value="delhi">delhi</option>
<option value="agra">agra</option>
</select><br>
<label for="zip">zip</label>
<input type="text" id="zip" ><br>
Output:-
NAME-Neema Raikhola
Roll no-44
Section -C2
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
</ol>
<!-- Description List -->
<h2>Description List</h2>
<dl>
<dt>HTML</dt>
<dd>HyperText Markup Language</dd>
<dt>CSS</dt>
<dd>Cascading Style Sheets</dd>
</dl>
<!-- Definition List -->
<h2>Definition List</h2>
<dl>
<dt>Computer</dt>
<dd>A machine that performs computations</dd>
<dt>Internet</dt>
<dd>A global network connecting millions of computers</dd>
</dl>
</body> </html>
output:-
NAME-Neema Raikhola
Roll no-44
Section -C2