Rinku Lab File
Rinku Lab File
OF
“WEB PROGRAMMING LAB”
(13060213)
10
11
12
13
14
15
16
17
EXPERIMENT – 1
AIM- Write an HTML code to display your education details in a tabular format.
<!DOCTYPE html>
<html>
<head>
<title>Education Details</title>
<style>
body {
font-family: Arial, sans-serif;
padding: 20px;
}
table {
width: 70%;
border-collapse: collapse;
margin: 0 auto;
}
th, td {
border: 1px solid #444;
padding: 10px;
text-align: center;
}
th {
background-color: #f2f2f2;
}
caption {
font-size: 1.5em;
margin-bottom: 10px;
}
</style>
</head>
<body>
<table>
<caption>My Education Details</caption>
<thead>
<div class="info">
<h2>Name: Rinku Saini</h2>
<p>Roll No: 241306025</p>
</div> <tr>
<th>Qualification</th>
<th>Institution</th>
<th>Year of Passing</th>
<th>Percentage / CGPA</th>
</tr>
</thead>
<tbody>
<tr>
<td>10th class</td>
<td>Budhera public School</td>
<td>2021</td>
<td>85%</td>
</tr>
<tr>
<td>12th class</td>
<td>Budhera public school</td>
<td>2023</td>
<td>88%</td>
</tr>
<tr>
<td>graduation(BCA)</td>
<td>SGT UNIVERSITY</td>
<td>2024</td>
<td>Presuring</td>
</tr>
</tbody>
</table>
</body>
</html>
Output
EXPERIMENT – 2
<body>
<h1>Rinku Saini</h1>
<h3>Roll no: 241306025</h3>
<p class="contact-info">
</p>
<div class="section">
<h2>Career Objective</h2>
<p>
To obtain a challenging position where I can utilize my skills and contribute to the success of
the
organization.
</p>
</div>
<div class="section">
<h2>Education</h2>
<ul>
<li>Bachelor in Computer applications, SGT University (2024 - 2028)</li>
<li>High School,Delhi pulic School (2021 - 2023)</li>
</ul>
</div>
<div class="section">
<h2>Skills</h2>
<ul>
<li>HTML, CSS, JavaScript</li>
<li>Python, Java</li>
<li>Problem Solving and Teamwork</li>
</ul>
</div>
<div class="section">
<h2>Experience</h2>
<ul>
<li>fresher</li>
</ul>
</div>
<div class="section">
<h2>Projects</h2>
<ul>
<li>Portfolio Website – A personal site to showcase my work and resume</li>
</ul>
</div>
<div class="section">
<h2>Languages</h2>
<ul>
<li>English – Fluent</li>
</ul>
</div>
<div class="section">
<h2>Hobbies</h2>
<ul>
<li>Coding challenges</li>
<li>Traveling</li>
</ul>
</div>
</body>
</html>
Output
EXPERIMENT – 3
AIM - Write an HTML code to create a Home page having three links: About Us, Our
Services and Contact Us. Create separate web pages for the three links.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Home Page</title>
</head>
<body>
<div class="info">
<h2>Name: Rinku Saini</h2>
<h3>Roll No: 241306025</h3>
</div>
<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>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>About Us</title>
</head>
<body>
<h1>About Us</h1>
<p>We are a company dedicated to delivering quality services to our clients.</p>
<a href="index.html">Back to Home</a>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Our Services</title>
</head>
<body>
<h1>Our Services</h1>
<ul>
<li>Web Development</li>
<li>Mobile App Development</li>
<li>Digital Marketing</li>
</ul>
<a href="index.html">Back to Home</a>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Contact Us</title>
</head>
<body>
Output
Experiment 4
AIM: Write an HTML code to create a login form. On submitting the form, the user should
get navigated to a profile page .
Source Code
<!DOCTYPE html>
<html lang="en">
<head>
<title>Login</title>
<style>
body {
background-color: #f4f4f4;
display: flex;
height: 100vh;
align-items: center;
justify-content: center;
.login-container {
background: #fff;
padding: 2em;
border-radius: 8px;
width: 300px;
input[type="text"],
input[type="password"] {
width: 100%;
padding: 0.75em;
border-radius: 4px;
button {
width: 100%;
padding: 0.75em;
background-color: #28a745;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
button:hover {
background-color: #218838;
</style>
</head>
<body>
<div class="login-container">
<h2>Login</h2>
<label for="username">Username:</label>
<label for="password">Password:</label>
<input type="password" id="password" name="password" required />
<button type="submit">Login</button>
</form>
</div>
</body>
</html>
2. Profile Page
<!DOCTYPE html>
<html lang="en">
<head>
<title>Profile</title>
<style>
body {
background-color: #e9f5ff;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
.profile-box {
background: white;
padding: 2em;
border-radius: 8px;
text-align: center;
</style>
</head>
<body>
<div class="profile-box">
</div>
</body>
</html>
EXPERIMENT – 5
AIM – Write an HTML code to create a Registration Form. On submitting the form, the user
should be asked to login with this new credentials.
<!DOCTYPE html>
<html lang="en">
<head>
<title>Register</title>
<style>
body {
background-color: #f0f8ff;
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
}
.form-container {
background: white;
padding: 2em;
border-radius: 8px;
width: 320px;
input {
width: 100%;
padding: 0.75em;
border-radius: 4px;
button {
width: 100%;
padding: 0.75em;
background-color: #007bff;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
button:hover {
background-color: #0056b3;
</style>
</head>
<body>
<div class="form-container">
<h2>Register</h2>
<label for="email">Email:</label>
<label for="username">Username:</label>
<label for="password">Password:</label>
<button type="submit">Register</button>
</form>
</div>
</body>
</html>
2. Login Page
<!DOCTYPE html>
<html lang="en">
<head>
<title>Login</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #fdf6e3;
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
.form-container {
background: white;
padding: 2em;
border-radius: 8px;
width: 300px;
input {
width: 100%;
padding: 0.75em;
border-radius: 4px;
button {
width: 100%;
padding: 0.75em;
background-color: #28a745;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
button:hover {
background-color: #218838;
</style>
</head>
<body>
<div class="form-container">
<h2>Login</h2>
<label for="username">Username:</label>
<label for="password">Password:</label>
<button type="submit">Login</button>
</form>
</div>
</body>
</html>
Output
EXPERIMENT -6
AIM – Write an HTML code to create your Institute website, Department Website and
Tutorial website for specific subject.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>My Institute</title>
</head>
<body>
div class="info">
</div>
<h1>Welcome to My Institute</h1>
<h2>Departments</h2>
<ul>
</ul>
<footer>
<p>© 2025 My Institute. All rights reserved.</p>
</footer>
</body>
</html>
Output
Experiment 7
AIM: Write an HTML code to illustrate the usage of the following: Ordered list, Unordered
list and Definition list.
<!DOCTYPE html>
<head>
<meta charset="UTF-8">
<<tle>Document</<tle>
</head>
<body>
<h1>Nested LIST</h1>
<p>Rinku Saini</p>
<p>241306025</p>
<p>BCA2A</p>
<ol type="A">
<li>APPLE</li>
<li>MANGO</li>
<ul type="square">
<li>green mango</li>
<li>red mango</li>
</ul>
<li>BANANA</li>
<ul type="disc">
<li> 10 piece</li>
<ul type="circle">
<li>60 repees</li>
</ul>
<li>5 piece</li>
<ul type="circle">
<li>30 repees</li>
</ul>
</ul>
<dl>
<dt>ORANGE</dt>
<dt>GRAPES</dt>
</dl>
<li>PINEAPPLE</li>
</od>
</body>
</html>
Output
Experiment-8
AIM: Write an html code to create a frameset having header, navigation and content
sections. Source Code:
<!Doctype html>
<html>
<frameset rows="30,70">
<frame src="header.html">
<frameset cols="25,75">
<frame src="navigation.html">
<frame src="content.html">
</frameset> </html>
header.html
<!Doctype html>
<html>
<body bgcolor="LightSteelBlue">
<h1 align="center">THE CULINARY HA VEN GROUP</h1>
<h2 align="center">When Passion Meets Tastebuds</h2>
</body> </html>
navigation.html
<!Doctype html>
<html>
<body bgcolor="AntiqueWhite">
<h2>CulinaryHavenGroup</h2>
<a href="#">Menu<br><br></a>
<a href="#">Specialties<br><br></a>
<a href="#">Reservations<br><br></a>
<a href="#">Opening<br><br></a>
<a href="#">Contact Us<br><br></a>
<a href="#">Sign Up/Login<br><br></a>
<a href="#">Terms and Conditions<br><br></a>
</body> </html>
content.html
<!Doctype hmtl>Rinku (241306025)
<html>
<body bgcolor="MintCream">
<h3 align="center"><br><br>Share, Explore And Celebrate The Art Of
Cooking</h3>
<p align="center">"Welcome to our Culinary Haven Group,where each dish is crafted to
perfection in an elegant setting.Experience the art of fine dining with exquisite flavors and
exceptional service that will transport you to a world of culinary delight.Whether you're
here to discover new recipes, exchange tips, or simply savor the joy of food, this is your
sanctuary for delicious discoveries. Join us in creating a space filled with flavor, creativity,
and inspiration. <strong>Let's cook, share, and enjoy every bite together! </strong>"</p>
<br><br><br><br>
<h2 align="center">Contact Us</h2>
<h4 align="center">Leave us a message we will be happy to respond.</h4>
</body>
</html>
Output
EXPERIMENT 9
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
</head>
<body>
<div class="info">
</div>
This paragraph is styled using inline CSS. The font size is increased, and the color is green.
</p>
<button style="background-color: orange; color: white; padding: 10px 20px; border: none;
border-radius: 5px;">
Click Me
</button>
<html>
Output
EXPERIMENT – 10
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
body {
background-color: #f0f8ff;
h1 {
color: #2c3e50;
text-align: center;
p{
font-size: 18px;
color: #34495e;
padding: 10px;
.highlight {
background-color: #ffeaa7;
padding: 10px;
margin: 15px 0;
button {
background-color: #0984e3;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
button:hover {
background-color: #74b9ff;
</style>
</head>
<body>
<div class="info">
</div>
<p>This paragraph uses the default paragraph styling from the internal CSS block.</p>
<div class="highlight">
This is a highlighted message using a custom class.
</div>
<button>Click Me</button>
</body>
</html>
Output
EXPERIMENT – 11
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="styles.css"> <!-- Link to the external CSS file -->
</head>
<body>
<div class="info">
</div>
<div class="note">
</div>
<button>Click Me</button>
</body>
</html>
Output
Experiment:- 12
1) Introduction to CSS
CSS (Cascading Style Sheets) is a stylesheet language used to describe the presentation of a
document written in HTML or XML. CSS controls the layout and appearance of web pages,
including elements like fonts, colors, spacing, and positioning. It allows web developers to
separate content from design, making websites more maintainable and visually appealing.
2) Features of CSS
• Separation of content and design: CSS allows HTML to focus on structure, while style
rules define the visual design.
• Reusability: One CSS file can style multiple web pages, saving time and effort.
• Cascading rules: Styles are applied based on hierarchy and priority, making
customization flexible.
• Responsive design: CSS supports media queries that adapt the layout for different
screen sizes.
• Selector-based styling: Target elements precisely using selectors like IDs, classes,
tags, etc.
3) Advantages of CSS
• Improved website performance: CSS files are cached by browsers, reducing page
load time.
• Consistency: A single stylesheet can enforce a uniform design across all pages.
• Easier maintenance: Updating the CSS file automatically updates the style across all
pages.
• Accessibility: CSS makes content more accessible by allowing flexible layout and
responsive design.
• Customization: Users can override styles (e.g., for accessibility tools).
4) Types of CSS
1. Inline CSS
• Style is applied directly to HTML elements using the style attribute.
• Example: <p style="color: red;">This is red text.</p>
2. Internal CSS
• Style rules are defined within a <style> tag inside the <head> section of the HTML
document.
• Useful for single-page styling.
3. External CSS
• Style rules are written in a separate .css file and linked using the <link> tag.
• Best for multi-page websites.
5) CSS Example
HTML + External CSS Example
HTML File (index.html):
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
</head>
<body>
<p>By Rinku Saini 241306025</p> <!-- Updated name and roll number -->
<ul class="navbar">
<li><a href="#">Home</a></li>
<li><a href="#">Services</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Contact</a></li>
</ul>
<div class="main-content">
</div>
<!-- Image Sprite Example -->
</body>
</html>
Output
EXPERIMENT – 13
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link
href="https://fonts.googleapis.com/css2?family=Montserrat:wght@600&family=Open+Sans
&display=swap" rel="stylesheet">
<style>
body {
margin: 0;
padding: 0;
color: #2d3436;
.container {
max-width: 900px;
padding: 40px;
background-color: #ffffff;
border-radius: 12px;
h1 {
font-size: 36px;
text-align: center;
color: #0984e3;
margin-bottom: 20px;
text-transform: uppercase;
p{
font-size: 18px;
line-height: 1.8;
margin-bottom: 20px;
.highlight {
background-color: #ffeaa7;
padding: 15px;
margin-bottom: 20px;
font-style: italic;
}
.custom-box {
padding: 20px;
background-color: #dfe6e9;
border-radius: 10px;
.custom-box:hover {
background-color: #b2bec3;
.btn {
display: inline-block;
background-color: #00b894;
color: white;
border: none;
border-radius: 8px;
text-decoration: none;
font-weight: bold;
.btn:hover {
background-color: #00cec9;
}
/* Responsive Design */
.container {
padding: 20px;
margin: 20px;
h1 {
font-size: 28px;
</style>
</head>
<body>
<div class="container">
<h1>CSS Styling</h1>
<div class="info">
</div>
<p>
This is a demonstration of advanced CSS styling, including fonts, colors, box shadows, and
responsive layout. The design is both clean and mobile-friendly.
</p>
<p class="highlight">
This paragraph is highlighted using background color and a left border. It uses italic
styling to emphasize the content.
</p>
<div class="custom-box">
This box uses border radius, transitions, and hover effects for interactivity.
</div>
<br>
</div>
</body>
</html>
Output
EXPERIMENT – 14
<!DOCTYPE html>
<html lang="en">
<head>
</head>
<body>
<div class="info">
</div>
<h1 id="title1" style="color: blue; font-size: 28px; text-align: center;">This is Heading 1 (ID
Example)</h1>
<div id="box1" style="width: 200px; height: 100px; background-color: lightgray; border: 2px
solid black; margin-bottom: 10px;">
Box with ID
</div>
</div>
Output
EXPERIMENT – 15
AIM: Advance CSS:
1. Grouping 2. Dimension
3. Display 4. Positioning
5. Floating 6. Align
7. Pseuodo 8. class Image sprites
9.Attribute sector 10. Navigation bar
1. Grouping Selector
Code:
<!DOCTYPE html>
<html>
<head>
<style>
h1, h2, p {
color: navy;
font-family:
Arial, sans-
serif;
}
</style>
</head>
<body>
<hr>
<p><b>Name: Sunidhi <br>Roll No.:241306046</b></p>
<hr>
<p class="font-style">This text uses custom font styling.</p>
</body>
</html>
Output:
Code:
<!DOCTYPE html>
<html>
<head>
<style>
.box {
width:
200px;
height:
100px;
background
-color:
lightblue;
}
</style>
</head>
<body>
<hr>
<p><b>Name: Sunidhi<br>Roll No.:241306046</b></p>
<hr>
<div class="box">Fixed size box</div>
</body>
</html>
Output:
3. Display Property
Use: Control how elements are displayed (block, inline, flex, etc.).
Code:
<!DOCTYPE html>
<html>
<head>
<style> .inline-box {
display: inline-block;
width: 100px;
height: 50px;
background: orange;
margin: 5px;
}
</style>
</head>
<body>
<hr>
<p><b>Name: Sunidhi <br>Roll No.:241306046</b></p> <hr>
<div class="inline-box">Box 1</div>
<div class="inline-box">Box 2</div>
</body>
</html>
Output:
Code:
<!DOCTYPE html>
<html>
<head>
<style> .relative-box {
position: relative; top:
20px; left: 30px;
background: lightgreen;
padding: 10px;
}
</style>
</head>
<body>
<hr>
<p><b>Name: Sunidhi <br>Roll No.:241306046</b></p>
<hr>
<div class="relative-box">Relative Positioned Box</div>
</body>
</html>
Output:
5. Floating
Code:
<!DOCTYPE html>
<html>
<head>
<style>
.float-box {
float: left;
width: 150px;
height: 100px;
margin: 10px;
background-color: pink;
}
</style>
</head>
<body>
<hr>
<p><b>Name: Sunidhi <br>Roll No.:241306046</b></p>
<hr>
<div class="float-box">Box 1</div>
<div class="float-box">Box 2</div>
<p>Text wraps around floated boxes.</p>
</body>
</html>
Output:
6. Text Align
Code:
<!DOCTYPE html>
<html>
<head>
<style> .center-
text { text-align:
center; color:
darkred;
}
</style>
</head>
<body>
<hr>
<p><b>Name: Sunidhi <br>Roll No.:241306046</b></p>
<hr>
<p class="center-text">This text is centered.</p>
</body>
</html>
Output:
7. Pseudo-class
Code:
<!DOCTYPE html>
<html>
<head> <style> a:hover {
color: red; text-decoration:
underline;
}
</style>
</head>
<body>
<hr>
<p><b>Name: Sunidhi<br>Roll No.:241306046</b></p>
<hr>
<a href="#">Hover over this link</a>
</body>
</html>
Output:
9. Attribute Selector
Code:
<!DOCTYPE html>
<html>
<head>
<style>
input[type="text"] { background-
color: #e0f7fa; border: 1px solid
#00acc1;
}
</style>
</head>
<body>
<hr>
<p><b>Name: Sunidhi <br>Roll No.:241306046</b></p>
<hr>
<input type="text" placeholder="Text input">
<input type="password" placeholder="Password input">
</body>
</html>
Output:
Navigation Bar Code (HTML + CSS)
Code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>CSS Navigation Bar</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<hr>
<p><b>Name: Sunidhi <br>Roll No.:241306046</b></p>
<hr>
<nav class="navbar">
<div class="logo">MySite</div>
<ul class="nav-links">
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Services</a></li>
<li><a href="#">Gallery</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>
</body>
</html>
Output:
Expriment 16
Creating Page Layout and site designs
<!DOCTYPE html>
<html lang="en">
<head>
<style>
*{
box-sizing: border-box;
margin: 0;
padding: 0;
body {
background: #007BFF;
color: #333;
line-height: 1.6;
header {
background: #333;
color: #fff;
display: flex;
justify-content: space-between;
align-items: center;
.nav-links {
list-style: none;
display: flex;
gap: 1rem;
.nav-links li a {
color: white;
text-decoration: none;
padding: 0.5rem;
.nav-links li a:hover {
background: #555;
border-radius: 5px;
.container {
display: flex;
margin: 2rem;
gap: 2rem;
aside {
width: 20%;
background: #fff;
padding: 1rem;
border-radius: 8px;
box-shadow: 0 0 5px rgba(0,0,0,0.1);
main {
flex: 1;
background: #fff;
padding: 1rem;
border-radius: 8px;
.card-grid {
display: grid;
gap: 1rem;
margin-top: 1rem;
.card {
padding: 1rem;
border-radius: 6px;
color: white;
.card:hover {
transform: translateY(-5px);
.card-1 {
background: #FF6F61;
.card-2 {
background: #6B5B95;
.card-3 {
background: #88B04B;
footer {
text-align: center;
background: #333;
color: white;
padding: 1rem;
margin-top: 2rem;
.container {
flex-direction: column;
aside {
width: 100%;
</style>
</head>
<body>
<header>
<h1>My Website</h1>
<nav>
<ul class="nav-links">
<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>
</header>
<div class="container">
<aside>
<h2>Sidebar</h2>
<ul>
</ul>
</aside>
<main>
<h2>Main Content</h2>
<div class="card-grid">
<h3>Card 1</h3>
</div>
<h3>Card 2</h3>
</div>
<h3>Card 3</h3>
<p>Web Programming</p>
</div>
</div>
</main>
</div>
<footer>
</footer>
</body>
</html>
Output
EXPERIMENT – 17
AIM: Writing program in XML and create a style sheet in CSS & display the
document in internet explorer.
CODE:
XML FILE
<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="style2.css"?>
<library>
<student>
<name>RINKU SAINI</name>
<regno>241306025</regno>
</student>
<book>
<title> Oppenheimer </title>
<author>Christopher Nolen</author>
<year>2014</year>
</book>
<book>
<title>The Hobbit</title>
<author>J.R.R. Tolkien</author>
<year>1937</year>
</book>
</library>
name {
display: block;
font-size: 22px;
color: #1a237e;
font-weight:
bold;
}
regno {
display:
block;
font-size:
18px;
color:
green;
}
book { display:
block; margin:
15px auto;
padding: 10px;
border: 1px solid
#ccc;
background-color:
#fff;
}
title {
display:
block;
font-size:
16px;
font-weight:
bold;
}
author {
display:
block;
font-style:
italic;
margin-
top: 5px;
}
year {
display:
block;
margin-
top: 2px;
font-size:
14px;
}
OUTPUT: