Web Project
Web Project
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Your CV</title>
</head>
<body>
<h1>Atul Chaudhary - Curriculum Vitae</h1>
<h2>Education</h2>
<p>Bachelor's Degree - IIMT ENGINEERING COOLEGE MEERUT (2025)</p>
<p>High School - Aryan International School (2019)</p>
<h2>Experience</h2>
</body> </html>
Output
Experiment 3
Qs. Write an HTML code to create a homepage having
links for About Us, Our Services and Contact Us.
Code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Home Page</title>
</head>
<body>
<h1>Welcome to Our Website</h1>
<nav>
<ul>
<li><a href="about.html">About Us</a></li>
<li><a href="services.html">Our Services</a></li>
<li><a href="contact.html">Contact Us</a></li>
</ul>
</nav>
</body>
</html>
About.html:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>About Us</title>
</head>
<body>
<h1>About Us</h1>
<p>We are a company dedicated to providing excellent services to our clients.</p>
</body>
</html>
Services.html:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Our Services</title></head>
<body>
<h1>Our Services</h1>
<p>We offer a wide range of services to meet the needs of our customers.</p>
<P> like online products</P>
</body>
</html>
Contact.html:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Contact Us</title>
</head><body>
<h1>Contact Us</h1>
<p>Name :Atul Chaudhary</p>
<p> phone no : 7351079248</p>
<p>
email : [email protected]
</p>
</body>
</html>
OUTPUT
Experiment 4
Qs. Write an HTML code to create a login form. On
submitting the form, the user should be navigated to a
profile page.
Code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login Form</title>
<style>
body, html {
height: 100%;
margin: 0;
font-family: Arial, sans-serif;
}
.background {
background-image: url(bggg.jpg);
background-size: cover;
background-position: center;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
}
.login-container {
background-color: rgba(255, 255, 255, 0.8);
padding: 20px;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
form {
max-width: 300px;
margin: 0 auto;
}
h2 {
text-align: center;
margin-bottom: 20px;
}
label {
display: block;
margin-bottom: 6px;
}
input[type="text"],
input[type="password"],
button {
width: 100%;
padding: 10px;
margin-bottom: 10px;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
}
button {
background-color: #4CAF50;
color: white;
border: none;
cursor: pointer;
}
button:hover {
background-color: #45a049;
}
</style>
</head>
<body>
<div class="background">
<div class="login-container">
<h2>Login</h2>
<form action="profile.html" method="post">
<div>
<label for="username">Username:</label>
<input type="text" id="username" name="username" required>
</div>
<div>
<label for="password">Password:</label>
<input type="password" id="password" name="password" required>
</div>
<div>
<button type="submit">Login</button>
</div>
</form>
</div>
</div>
</body>
</html>
OUTPUT
Experiment 5
Qs. Write an HTML code to create a registration
form. On submitting the form, the user should be
asked to login with new credentials.
Code:
<!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>
<body>
<form >
<h2>Online Registration Form </h2>
<br><label for="name">Name:</label>
<input type="text" name="name" id="name">
<br/>
<br/>
<label for="password">Password:</label>
<input type="password" name="password" id="password">
<br/>
<br/>
<p>Sex:
<label for="gender">Male</label>
<input type="radio" name="name" id="gender">
<label for="gender">Female
</label>
<input type="radio" name="name" id="gender">
<br/>
<br/>
<label for="account">Account Type:</label>
<select name="account" id="account">
<option value="saving Account">Saving Account</option>
<option value="current account">Current Account</option>
</select>
<br/>
<br/>
<label for="number">Account Number:</label>
<input type="text" name="name" id="number">
<br/>
<br/>
<label for="name">Facilities:</label>
<input type="checkbox" name="name" id="name"> ATM Card
<li>Hardik pandey</li>
<li>rohit sharma</li>
<li>ms dhoni</li>
<li>sikhar dhawan</li>
</ol>
<br>
<ol>Australia
<li>Pat cummins</li>
<li>Maxwell</li>
<li>starc</li>
</ol>
</ol>
<br>
<ol><b>FOOTBALL</b>
<hr>
<ol>India
<li>sunil chhetri</li>
<li>Anirudh Thapa</li>
</ol>
<br>
<ol>Argentina
<li>sunil chhetri</li>
<li>Anirudh Thapa</li>
</ol>
</ol>
</body>
</html>
OUTPUT
Experiment 7
Qs. Write an HTML code to illustrate the usage of
internal CSS.
Code:
<HTML>
<HEAD>
<TITLE>Great Recipes</TITLE>
</HEAD>
<FRAMESET ROWS="15%,*">
<FRAME SRC="recipetitlebar.html" NAME=TITLE SCROLLING=NO>
<FRAMESET COLS="20%,*">
<FRAME SRC="recipesidebar.html" NAME=SIDEBAR>
<FRAME SRC="recipes.html" NAME=RECIPES>
</FRAMESET>
<NOFRAMES>
<H1>Great Recipes</H1>
No frames? No Problem! Take a look at our
<A HREF="recipes.html">no-frames</A> version.
</NOFRAMES>
</FRAMESET>
</HTML>
recipes.html
<!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>
<body>
<H4>BREAKFAST</H4>
<OL>
<LI>
TACOS
</LI>
<LI>BURGER</LI>
<LI>
PIZZA
</LI>
</OL>
</body>
</html>
recipesidebar.html
<!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>
<body>
<h4>
CONTENT
</h4>
<a href="">google</a><br>
<a href="">google</a><br>
<a href="">google</a><br>
<a href="">google</a><br>
<a href="">google</a><br>
</body>
</html>
recipetitlebar.html
<!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>
<body>
<h1>
GREAT RECEPIES
</h1>
</body>
</html>
OUTPUT
Experiment 8
Qs. Write an HTML code to illustrate the usage of
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>Internal CSS Example</title>
<style>
/* Internal CSS Styles */
body {
font-family: Arial, sans-serif;
background-color: #f0f0f0;
}
h1 {
color: #333;
text-align: center;
}
p{
color: #666;
font-size: 16px;
line-height: 1.6;
}
.container {
max-width: 600px;
margin: 0 auto;
padding: 20px;
background-color: #fff;
border-radius: 10px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.alert {
padding: 10px;
background-color: #ffcc00;
color: #333;
border-radius: 5px;
}
</style>
</head>
<body>
<div class="container">
<h1>Internal CSS Example</h1>
<p>This is an example of using internal CSS within an HTML document to
style elements.</p>
<div class="alert">
<p>This is a styled alert box.</p>
</div>
<p>Internal CSS allows you to define styles that are specific to this HTML
document.</p>
</div>
</body>
</html>
Experiment 9
Qs. Write an HTML code to illustrate the usage of
external CSS, HTML
Code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>External CSS Example</title>
<link rel="stylesheet" href="styless.css">
</head>
<body>
<header>
<h1>Welcome to External CSS Example</h1>
</header>
<nav>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Services</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>
<div class="container">
<section>
<h2>About Us</h2>
<p>This is an example of using external CSS in HTML. With external
CSS, you can easily manage the styling of your website across multiple pages.</p>
</section>
<section>
<h2>Our Services</h2>
<p>We offer a wide range of services including web design, development,
and digital marketing solutions.</p>
</section>
</div>
<footer>
<p>© 2024 External CSS Example. All rights reserved.</p>
</footer>
</body>
</html>
EXTERNAL CSS
/* styles.css */
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}
header {
background-color: #333;
color: #fff;
padding: 20px 0;
text-align: center;
}
nav ul {
list-style-type: none;
margin: 0;
padding: 0;
}
nav ul li {
display: inline;
margin-right: 20px;
}
nav ul li a {
color: #333;
text-decoration: none;
}
.container {
max-width: 800px;
margin: 0 auto;
padding: 20px;
}
section {
margin-bottom: 40px;
}
h2 {
color: #333;
}
footer {
background-color: #333;
color: #fff;
text-align: center;
padding: 10px 0;
}
Experiment 10
Qs. Write program in XML for creation of DTD with
student information.
DTD Code:
<!DOCTYPE studentInformation [
<!ELEMENT studentInformation (student*)>
<!ELEMENT student (name, age, address, contact)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT age (#PCDATA)>
<!ELEMENT address (#PCDATA)>
<!ELEMENT contact (#PCDATA)>
]>
<studentInformation>
<student>
<name>ATUL CHAUDHARY</name><br>
<age>20</age><br>
<address>123 L block shastri nagar, meerut</address>
<contact>[email protected]</contact><br>
</student>
<student>
<name>]> Jane Smith</name><br>
<age>22</age>
<address>456 Elm St, Town</address>
<contact>[email protected]</contact>
</student>
</studentInformation>
Experiment 11
Qs. Write a script that reads an integer and
determines to display whether it's odd or even. Code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Odd or Even Checker</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
margin: 0;
padding: 0;
}
.container {
max-width: 600px;
margin: 100px auto;
background-color: #fff;
padding: 20px;
border-radius: 5px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
h1 {
text-align: center;
}
form {
text-align: center;
}
label {
display: block;
margin-bottom: 10px;
}
input[type="number"] {
padding: 10px;
width: 100%;
margin-bottom: 20px;
}
button {
padding: 10px 20px;
background-color: #007bff;
color: #fff;
border: none;
border-radius: 5px;
cursor: pointer;
}
button:hover {
background-color: #0056b3;
}
p#result {
text-align: center;
font-size: 18px;
margin-top: 20px;
}
.popup {
position: fixed;
top: 0;
left: 50%;
transform: translateX(-50%);
background-color: #4CAF50;
color: white;
padding: 16px;
border-radius: 5px;
z-index: 9999;
display: none;
}
</style>
</head>
<body>
<div class="container">
<h1>Odd or Even Checker</h1>
<form id="numberForm">
<label for="numberInput">Enter an integer:</label>
<input type="number" id="numberInput" required>
<button type="submit">Check</button>
</form>
<p id="result"></p>
</div>
<script>
document.getElementById('numberForm').addEventListener('submit',
function(event) {
event.preventDefault();
</style>
<script>
function handleClick() {
alert("Button Clicked!");
}
</script>
</head>
<body>
<div class="button-container">
<form>
<input type="button" value="Click me!" class="custom-button"
onclick="handleClick()">
</form>
</div>
</body>
</html>
Experiment 14
Qs. Develop a Radio Button using JavaScript in
HTML form.
Code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>RadioButton</title>
<script type="text/javascript">
function buttonDemo(obj)
{
alert("You have Selected option "+obj.value);
}
</script>
</head>
<body>
<form>
<input type="radio" name="gender" id="male" value="male"
onclick="buttonDemo(this)"/>
<label for="male">Male</label>
<input type="radio" name="gender" id="female" value="female"
onclick="buttonDemo(this)"/>
<label for="female">Female</label>
<input type="radio" name="gender" id="other" value="other"
onclick="buttonDemo(this)" />
<label for="other">Other</label>
</form>
</body>
</html>
Experiment 15
Qs. Write a code using JavaScript to validate the
password
Code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script type="text/javascript">
function myFunc(){
var mypwd = document.getElementById("pwd");
var myrepwd = document.getElementById("repwd");