Lokesh HTML Tasks
Lokesh HTML Tasks
Tiitle: Create a webpage that includes a scrolling header message, a table displaying details of your
favorite movies (such as name, genre, year, and rating), an image of your favorite actor/actress, a
movie trailer video with controls, and an audio player for a movie soundtrack that auto-plays when
the page loads.
CODE:
<!DOCTYPE html>
<html>
<head>
<title>Movie Detalis</title>
</head>
<body>
<h1>Telugu Movies</h1>
</body>
<tr><th>4</th><th>Devara</th><th>NTR</th><th>Janhvi kapoor</th></tr>
<tr><th>5</th><th>Salaar</th><th>Prabhas</th><th>Shruti Haasan</th></tr>
</table>
<img src="C:\Users\LOKESH\OneDrive\Pictures\download.jpeg"></br>
<audio src="C:\Users\LOKESH\Downloads\saaho_bgm.mp3"controls></audio>
</head>
</html>
O/P:
Program no:02
Title: Design a webpage that includes a horizontal navigation menu with links to "Home," "About,"
"Services," and "Contact," followed by a section that displays a list of your favorite books in a neat
table with columns for Title, Author, and Genre. Below the table, insert an image of the book cover
for one of the books, a video review of the book, and an audio clip of an author interview.
Code:
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<h2>Navigation</h2>
<hr>
<a href="#">Home</a>|
<a href="#">About</a>|
<a href="#">Services</a>|
<a href="#">Contact</a>
</hr>
<p>
<tr><th>Title</th><th>Author</th><th>Theme</th></tr>
</table>
</p>
<img src="C:\Users\LOKESH\OneDrive\Pictures\images.jpeg"height="250">
<h2>Video Review</h2>
</body>
Output:
Program no:03
Title:
Create a portfolio webpage with a header that scrolls a welcome message across the screen,
followed by a section that includes a table of your recent projects with columns for Project Name,
Description, and Date. Below the table, add an image of a screenshot from one of the projects, a
video tutorial on the project, and an audio description of the project.
Code:
<!DOCTYPE html>
<html>
<head>
<title>Portfolio website</title>
</head>
<body>
<h1>Portfolio</h1>
</body>
<tr><th>S.no</th><th>Project names</th><th>Discription</th><th>Date</th></tr>
</table>
<audio controls>
<source src="https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3"
type="audio/mpeg" />
</audio>
</html>
OutPut:
Project no:04
Title:Create a basic HTML page introducing yourself. Design a webpage using appropriate HTML
tags that displays:
Source code:
<!DOCTYPE html>
<html>
<head>
<title>Introduce yourself</title>
</head>
<body>
<h1>K.LOKESH</h1>
<p>Hello! My name is K.lokesh, and I am a web developer with a passion for crafting elegant
and functional websites.
<ul type="circle">
<li>Reading books</li>
</ul>
<ul type="square">
</ul>
<ul type="disc">
<li>Playing games</li>
</ul>
<ul type="none">
<li>Exploring nature</li>
</ul>
</body>
</html>
Output:
Project no:05
Title:
Create a simple resume web page using HTML. The resume should include
Source code:
<!DOCTYPE html>
<html>
<head>
<title>Introduce yourself</title>
</head>
<body>
<h1>K.LOKESH</h1>
<h2>BIO</h2>
<p>
My passion lies in creating user-friendly and visually appealing applications that solve real-
world problems.
I am continuously honing my skills to stay updated with the latest trends in technology.
</p>
<h2>Skills</h2>
<ul type="circle">
<li>Html,css</li>
</ul>
<ul type="square">
<li>C,C++</li>
</ul>
<ul type="disc">
</ul>
<ul type="none">
<li>Orcale in mysql</li>
</ul>
<h2>Qualifications</h2>
<ol type="1"></ol>
<ol type="A"></ol>
<ol type="a"></ol>
<li>Basic knowledge of cybersecurity, network security, and practical experience with tools like
Wireshark.</li>
</body>
</html>
Output:
Program no:06
Title:
Source code:
<!DOCTYPE html>
<html>
<head>
<title>Paragraph webpage</title>
</head>
<body>
<h2>paragraph</h2>
<p>Growth strategies involve various approaches for a business <b>to increase its market
share,
<small> marketing, or pricing. For example,Facebook uses market penetration to retain its
market share.</small>
</p>
</body>
</html>
Output:
Program no:07
Title:
Source code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Shopping Categories</title>
</head>
<body>
<ul>
<li>Fruits
<ul>
<li>Apple</li>
<li>Banana</li>
<li>Orange</li>
</ul>
</li>
<li>Vegetables
<ul>
<li>Carrot</li>
<li>Broccoli</li>
<li>Spinach</li>
</ul>
</li>
<li>Electronics
<ul>
<li>Smartphone</li>
<li>Tablet</li>
<li>Headphones</li>
</ul>
</li>
</ul>
</body>
</html>
Output:
Project no:08
Title :
Source Code :
<!DOCTYPE html>
<html lang="en">
<head>
<title>Semester Subjects</title>
</head>
<body>
<h2>Semester Subjects</h2>
<li>Mathematics</li>
<li>Physics</li>
<li>Chemistry</li>
<li>Computer Science</li>
<li>English Literature</li>
</ol>
</body>
</html>
Output:
Program no:09
Title :
Source code:
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<h2>Student Marks</h2>
<thead>
<tr>
<th>Name</th>
<th>Subject</th>
<th>Marks</th>
<th>Grade</th>
</tr>
</thead>
<tbody>
<tr>
<td>lokesh</td>
<td>DBMS</td>
<td>63</td>
<td>A</td>
</tr>
<tr>
<td>JOseph</td>
<td>Programming C</td>
<td>59</td>
<td>B</td>
</tr>
<tr>
<td>MAneesh</td>
<td>Java</td>
<td>70</td>
<td>A+</td>
</tr>
<tr>
<td>Gnanendra</td>
<td>Cloud computing</td>
<td>60</td>
<td>A</td>
</tr>
</tbody>
</table>
</body>
</html>
Output:
Program no:10
Title:
Create a webpage that displays two images using the <img> tag.
Source code:
<!DOCTYPE html>
<html>
<head>
<title>Image Display</title>
</head>
<body>
<div>
</div>
<div>
</div>
</body>
</html>
Output:
Program no:11
Source Code:
<!DOCTYPE html>
<html>
<head>
<meta>
</head>
<body>
<h1>Multimedia Demo</h1>
<div class="media-container">
<h2>Video Example</h2>
<source src="https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm"
type="video/webm" />
</video>
</div>
<div class="media-container">
<h2>Audio Example</h2>
<audio controls>
</audio>
</div>
</body>
</html>
Output:
Program no:12
Title:Create a styled section using the <div> tag. The <div> should contain:
Source code:
<!DOCTYPE html>
<html>
<head>
<title>Styled Notification</title>
</head>
<body>
</div>
</body>
</html>
Output:
Program no:13
Title:
Source code:
<!DOCTYPE html>
<html>
<head>
<title>Marquee Demo</title>
</head>
<body>
</marquee>
<h2>Vertical Image Marquee</h2>
<marquee direction="up" scrollamount="4" style="height: 200px; width: 150px; border: 1px solid,
display: block; margin-top: 20px;">
</marquee>
</body>
</html>
Output:
Program no:14
Title:
Source code:
<!DOCTYPE html>
<html>
<head>
<body background="C:\Users\LOKESH\OneDrive\Pictures\temerario01.webp">
<p>This beautiful background image shows a serene forest with sun rays filtering through the trees,
creating a calm and peaceful atmosphere.</p>
</body>
</html>
Output:
Program no:15
Title :
Create a Student Registration Form Design a simple registration form with the following fields
Source code:
<!DOCTYPE html>
<html>
<head>
</head>
<form>
<label for="fullName">Full Name:</label><br>
<label for="email">Email:</label><br>
<label>Gender:</label><br>
<label for="male">Male</label><br>
<label for="female">Female</label><br>
<label for="other">Other</label><br><br>
<label>Courses Interested:</label><br>
<label for="c">C</label><br>
<label for="java">Java</label><br>
<label for="python">Python</label><br>
<label for="html">HTML</label><br><br>
<label for="location">Location:</label><br>
<option value="hyderabad">Hyderabad</option>
<option value="vizag">Vizag</option>
<option value="vijayawada">Vijayawada</option>
</select><br><br>
<label for="about">About Yourself:</label><br>
</form>
</html>
Output:
Program no :16
Title:
Source code:
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<div class="intro">
<p>Welcome to our online course enrollment page! Fill out the form below to get started on
your learning journey.</p>
<img src="C:\Users\LOKESH\OneDrive\Pictures\why-online-learning-is-good-
1.jpg"alt="Online Learning" style="max: width 150px;; height: 200px;;">
</div>
<form>
<br>
<label for="age">Age:</label>
<br>
</select>
<br>
<label for="online">Online</label>
<label for="offline">Offline</label>
<br>
<div class="terms">
</div>
<br>
<br>
<br>
</form>
</body>
</html>
Output:
Program no:17
Title:
Feedback Form for a Website Instructions: Create a feedback form that asks users:
Source Code:
<!DOCTYPE html>
<html>
<head>
<title>Feedback Form</title>
</head>
<body>
<h1>Feedback Form</h1>
<form>
<label for="name">Name:</label>
<br>
<label for="email">Email:</label>
<br>
<label for="google">Google</label>
<label for="friend">Friend</label>
<label for="others">Others</label>
<br>
<label for="speed">Speed</label><br>
<label for="content">Content</label><br>
<label for="responsiveness">Responsiveness</label><br>
<br>
</select>
<br>
<br>
</form>
</body>
</html>
Output:
Program no:18
Title:
Source code:
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p style="text-align: center;">Join us for an exciting day of innovation, learning, and fun!</p>
</div>
<tr><th>Event</th><th>Timing</th></tr>
</table>
<form>
<label for="name">Name:</label>
<br>
<br>
<option value="ece">Electronics</option>
<option value="mech">Mechanical</option>
<option value="civil">Civil</option>
</select>
<br>
<br>
<br>
<button type="submit">Register</button>
</form>
</body>
</html>
OUTPUT:
Program no:19
Title:
Source code:
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<div class="container">
<form>
<div class="form-group">
</div>
<div class="form-group">
</div>
<div class="form-group">
<option value="Backend">Backend</option>
<option value="Frontend">Frontend</option>
</select>
</div>
<div class="form-group">
<label for="skills">Skills:</label><br>
<div class="skills">
</div>
</div>
<div class="form-group"><br>
<label for="resume">Upload Resume:</label>
</div>
<div class="form-group"><br>
</div>
</form>
</div>
</body>
</html>
Output:
Program no:20
Title:
Source code:
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<header>
<h1>K.LOKESH</h1>
<nav>
<a href="home.html">Home</a> |
<a href="projects.html">Projects</a> |
<a href="contact.html">Contact</a>
</nav>
</header>
<hr>
<section>
<h2>About Me</h2>
<p>
Hello! I'm K.lokesh, a passionate Computer Science student currently pursuing my BSc in
Computers from Aditya Degree College.
I have a keen interest in web development, network security, and data analysis. With
experience in HTML, CSS, Python, and cybersecurity tools like Wireshark,
I'm always eager to learn new technologies and take on exciting projects.
</p>
</section>
</body>
</html>
Output:
Program no:21
Title:
Code:
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<div class="panel">
</div>
<div class="panel">
</body>
</html>
Output:
Program no:22
Title:
CODE:
<!DOCTYPE html>
<html>
<head>
<script>
function confirmRegistration() {
</script>
</head>
<body>
<label for="email">Email:</label><br>
<label>Gender:</label><br>
<label for="male">Male</label><br>
<label for="female">Female</label><br>
<label for="other">Other</label><br><br>
<label for="music">Music</label><br>
<label for="sports">Sports</label><br>
<label for="art">Art</label><br><br>
<option value="Visakhapatnam">Visakhapatnam</option>
<option value="Hyderabad">Hyderabad</option>
<option value="Vijayawada">Vijayawada</option>
<option value="Other">Other</option>
</select><br><br>
</form>
</body>
</html>
OUTPUT:
Program no:23
Title:
Code:
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<main>
<p>World leaders have come together to pledge stronger commitments towards reducing
carbon emissions. Experts praise this collaborative effort as a major step in combating climate
change, with new policies aiming for a sustainable future.</p>
</section>
<ul>
</ul>
</section>
</main>
<footer>
<div>Author: LOKESH</div>
</footer>
<script>
</script>
</body>
</html>
Output:
Program no:24
Title:
Build a payment selection form that groups options like UPI, Credit Card, and Cash on Delivery
under one box.
CODE:
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<h1>Payment Selection</h1>
<form>
<fieldset>
<legend>Payment Method</legend>
<input type="radio" id="upi" name="payment" value="UPI">
<label for="upi">UPI</label><br>
</fieldset>
<br>
</form>
</body>
</html>
Output:
Program no:25
Title:
Code:
<!DOCTYPE html>
<html>
<head>
<title>Product Offer</title>
</head>
<body>
<div class="offer-container">
<div class="original-price">$149.99</div>
<div class="discounted-price">$99.99</div>
</div>
</body>
</html>
OUTPUT:
Program no:26
TITLE:
Code:
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<header>
<h1>lokesh's Travel Blog</h1>
<nav>
<a href="#">Home</a> |
<a href="#">Destinations</a> |
<a href="#">Contact</a>
</nav>
<hr>
</header>
<p>
Last summer, I took an unforgettable trip to Araku Valley, a scenic hill station in Andhra
Pradesh.
The lush green valleys, winding roads, and waterfalls made the journey truly magical. I
visited Borra Caves,
tried delicious bamboo chicken, and enjoyed a peaceful train ride through tunnels and
bridges. It was an
</p>
</article>
<h3>Travel Tips</h3>
<ul>
</ul>
</aside>
</section>
<hr>
<p>Contact: [email protected]</p>
</footer>
</body>
</html>
OUTPUT:
Program no :27
Title:
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<blockquote>
“Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the
world.”
</blockquote>
</body>
</html>
OUTPUT:
Program no:28
Title:
<!DOCTYPE html>
<html>
<head>
<title>Support Form</title>
</head>
<body>
<div class="form-container">
<div class="delivery-info">
<h2>Delivery Info</h2>
<div class="form-group">
</div>
<div class="form-group">
</div>
<div class="form-group">
<label for="address">Address:</label>
</div>
</div>
</form>
</div>
</body>
</html>
CSS Code:
/* styles.css */
body {
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background-color: #f9f9f9;
.form-container {
width: 90%;
max-width: 400px;
background-color: #ffffff;
padding: 20px;
border-radius: 10px;
h2 {
margin-bottom: 15px;
font-size: 1.5em;
color: #333333;
.delivery-info {
padding: 15px;
border-radius: 8px;
background-color: #fafafa;
margin-bottom: 20px;
.form-group {
margin-bottom: 15px;
}
.form-group label {
display: block;
margin-bottom: 5px;
font-size: 0.9em;
color: #555555;
.form-group input,
.form-group textarea {
width: 100%;
padding: 10px;
border-radius: 5px;
font-size: 1em;
box-sizing: border-box;
.submit-btn {
width: 100%;
padding: 10px;
font-size: 1em;
color: #ffffff;
background-color: #007bff;
border: none;
border-radius: 5px;
cursor: pointer;
.submit-btn:hover {
background-color: #0056b3;
Output:
Program no:29
Title:
<html>
<head>
body {
margin: 0;
padding: 0;
background-color: #f9f9f9;
color: #333;
.gallery-container {
max-width: 800px;
padding: 20px;
background-color: #fff;
border-radius: 10px;
h1 {
text-align: center;
font-size: 2rem;
margin-bottom: 20px;
color: #007BFF;
.gallery {
display: flex;
flex-direction: column;
gap: 20px;
.gallery-item {
display: flex;
flex-direction: column;
align-items: center;
border: 1px solid #ddd;
border-radius: 8px;
overflow: hidden;
.gallery-item img {
width: 100%;
height: auto;
.gallery-item caption {
padding: 10px;
font-size: 1rem;
color: #555;
background-color: #f1f1f1;
width: 100%;
text-align: center;
</style>
</head>
<body>
<div class="gallery-container">
<div class="gallery">
<div class="gallery-item">
</div>
<div class="gallery-item">
</div>
</div>
</div>
</body>
</html>
Output:
Program no;30
Title:
Code:
<!DOCTYPE html>
<html>
<head>
<title>Universal and Type Selectors Layout</title>
</head>
<body>
<header>
<h1>Welcome to My Website</h1>
</header>
<div class="content">
<p>This is a simple webpage layout styled using universal and type selectors in CSS. The
universal selector ensures consistent base styles for all elements, while type selectors style specific
elements like headings, paragraphs, and lists.</p>
<ul>
</ul>
<p>Feel free to explore and modify the code to better understand the principles of CSS
selectors.</p>
</div>
<footer>
</footer>
</body>
</html>
Output:
Program no:31
Title:
Create a Login Form Using the <fieldset> and <legend> Tags
Html code:
<!DOCTYPE html>
<html>
<head>
<title>Login Form</title>
</head>
<body>
<form>
<fieldset>
<legend>Login Details</legend>
<label for="username">Username:</label>
<br><br>
<label for="password">Password:</label>
<br><br>
<button type="submit">Login</button>
</fieldset>
</form>
</body>
</html>
Output:
Program no:32
Title:
Code:
<!DOCTYPE html>
<html>
<head>
<style>
/* ID Selector */
#main-title {
color: #4CAF50;
text-align: center;
font-size: 2rem;
margin-bottom: 20px;
/* Class Selector */
.highlight {
background-color: #f9f9f9;
padding: 15px;
margin-bottom: 10px;
</style>
</head>
<body>
</body>
</html>
Output:
Program no:33
Title:
Code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Timetable Design</title>
<style>
body {
margin: 20px;
background-color: #f4f4f9;
color: #333;
.timetable {
width: 100%;
max-width: 800px;
margin: 0 auto;
border-collapse: collapse;
text-align: center;
padding: 10px;
.timetable th {
background-color: #4CAF50;
color: white;
font-size: 1rem;
.timetable tr:nth-child(even) {
background-color: #f9f9f9;
.timetable tr:hover {
background-color: #f1f1f1;
.time-slot {
font-weight: bold;
background-color: #dff0d8;
caption {
font-size: 1.5rem;
margin-bottom: 10px;
font-weight: bold;
</style>
</head>
<body>
<table class="timetable">
<caption>Weekly Timetable</caption>
<thead>
<tr>
<th>Time</th>
<th>Monday</th>
<th>Tuesday</th>
<th>Wednesday</th>
<th>Thursday</th>
<th>Friday</th>
</tr>
</thead>
<tbody>
<tr>
<td>Mathematics</td>
<td>Science</td>
<td>English</td>
<td>History</td>
<td>Geography</td>
</tr>
<tr>
<td>Physics</td>
<td>Mathematics</td>
<td>Biology</td>
<td>Computer Science</td>
<td>English</td>
</tr>
<tr>
<td>History</td>
<td>Geography</td>
<td>Mathematics</td>
<td>Science</td>
<td>Physics</td>
</tr>
<tr>
<td class="time-slot">1:00 - 2:00 PM</td>
<td>English</td>
<td>Biology</td>
<td>Computer Science</td>
<td>Physics</td>
<td>Mathematics</td>
</tr>
<tr>
<td>Science</td>
<td>History</td>
<td>Geography</td>
<td>Mathematics</td>
<td>Biology</td>
</tr>
</tbody>
</table>
</body>
</html>
Output:
Program no:34
Title:
Create a webpage where you style multiple elements using a class selector.
Code:
<!DOCTYPE html>
<html>
<head>
<style>
/* Class Selector */
.blue-text {
color: blue;
font-size: 18px;
</style>
</head>
<body>
<ul>
</ul>
</body>
</html>
Output:
Program no:35
Title:
Define a class selector that changes the background color of the elements to lightgray.
Code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
/* Class Selector */
.blue-text {
color: blue;
font-size: 18px;
.lightgray-bg {
background-color: lightgray;
padding: 10px;
}
</style>
</head>
<body>
<ul>
</ul>
</body>
</html>
Output:
Program no:36
Title:
Code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
/* Class Selector */
.blue-text {
color: blue;
font-size: 18px;
.lightgray-bg {
background-color: lightgray;
padding: 10px;
.bordered {
width: 200px;
height: 100px;
</style>
</head>
<body>
</ul>
</body>
</html>
Output:
Program no:37
Title:
Q: Design a webpage section with a large main title and a brief introduction below it.
Code:
<!DOCTYPE html>
<html>
<head>
<style>
*{
margin: 0;
padding: 0;
box-sizing: border-box;
h1 {
font-weight: bold;
text-align: center;
font-size: 2.5rem;
margin: 20px 0;
p{
text-align: left;
line-height: 1.6;
font-size: 1rem;
</style>
</head>
<body>
</body>
</html>
Output:
Program no:38
Title:
Product Showcase
Question:
Create a card showcasing a product with an image, a product name, a brief description, and a
clickable button for purchase.
Code:
<!DOCTYPE html>
<html>
<head>
<title>Product Showcase</title>
<style>
*{
margin: 0;
padding: 0;
box-sizing: border-box;
h1 {
font-weight: bold;
text-align: center;
font-size: 2.5rem;
margin: 20px 0;
/* Card Container */
.product-card {
width: 300px;
border-radius: 10px;
overflow: hidden;
text-align: center;
background-color: #fff;
.product-card h2 {
font-size: 1.5rem;
font-weight: bold;
margin: 15px 0;
}
/* Type Selector for Description */
.product-card p {
font-size: 1rem;
line-height: 1.6;
background-color: #f9f9f9;
padding: 10px;
.purchase-button {
display: inline-block;
margin: 15px 0;
font-size: 1rem;
color: #fff;
background-color: #4CAF50;
border: none;
border-radius: 5px;
cursor: pointer;
text-decoration: none;
.purchase-button:hover {
background-color: #45a049;
</style>
</head>
<body>
<h1>Product Showcase</h1>
<div class="product-card">
<img src="redmagic.jpg.jpg" alt="red magic" style="width: 100%;">
<h2>Product Name</h2>
<p>This is a brief description of the product. It highlights the features and benefits of the
product to attract potential buyers.</p>
</div>
</body>
</html>
Output:
Program no:39
Title:
Navigation Bar
Question:
Code:
<!DOCTYPE html>
<html>
<head>
<title>Navigation Bar</title>
<style>
*{
margin: 0;
padding: 0;
box-sizing: border-box;
nav {
background-color: #333;
display: flex;
justify-content: center;
padding: 10px;
nav a {
text-decoration: none;
color: white;
font-size: 18px;
.active {
background-color: #007BFF;
color: white;
border-radius: 5px;
}
nav a:hover {
background-color: #555;
color: #fff;
</style>
</head>
<body>
<nav>
<a href="#about">About</a>
<a href="#services">Services</a>
<a href="#portfolio">Portfolio</a>
<a href="#contact">Contact</a>
</nav>
</body>
</html>
Output:
Program no:40
Title:
Question:
Design a card featuring a user’s profile picture, name, and a short bio.
Code:
<!DOCTYPE html>
<html>
<head>
<style>
*{
margin: 0;
padding: 0;
box-sizing: border-box;
.profile-card {
width: 300px;
border-radius: 10px;
padding: 20px;
text-align: center;
background-color: #f9f9f9;
.profile-card img {
width: 100px;
height: 100px;
border-radius: 50%;
margin-bottom: 15px;
.profile-card h2 {
font-size: 24px;
margin-bottom: 10px;
color: #333;
}
.profile-card p {
font-size: 14px;
color: #666;
margin-bottom: 20px;
.profile-card .btn {
font-size: 16px;
color: #fff;
background-color: #007BFF;
border: none;
border-radius: 5px;
cursor: pointer;
.profile-card .btn:hover {
background-color: #0056b3;
</style>
</head>
<body>
<div class="profile-card">
<h2>pickachu</h2>
<p>A passionate web developer who loves creating beautiful and functional designs.</p>
<button class="btn">Follow</button>
</div>
</body>
</html>
Output:
Program no:41
Title:
Blog Layout
Question:
Design a blog layout with a main title, multiple blog posts with a title and description, and a side
section for additional information.
Code:
<!DOCTYPE html>
<html>
<head>
<title>Blog Layout</title>
<style>
*{
margin: 0;
padding: 0;
box-sizing: border-box;
.container {
display: flex;
flex-wrap: wrap;
padding: 20px;
.main-title {
text-align: center;
font-size: 36px;
font-weight: bold;
margin-bottom: 20px;
width: 100%;
.blog-posts {
flex: 3;
padding: 20px;
.blog-post {
margin-bottom: 20px;
padding-bottom: 10px;
.blog-post h3 {
font-size: 24px;
font-weight: bold;
color: #333;
}
.blog-post p {
font-size: 16px;
color: #555;
.sidebar {
flex: 1;
background-color: #f4f4f4;
padding: 20px;
.sidebar h4 {
font-size: 20px;
font-weight: bold;
margin-bottom: 10px;
.sidebar p {
font-size: 14px;
color: #555;
</style>
</head>
<body>
<div class="container">
<div class="blog-posts">
<div class="blog-post">
</div>
<div class="blog-post">
<p>This is the description for the second blog post. It provides a brief overview of the
content.</p>
</div>
<div class="blog-post">
<p>This is the description for the third blog post. It provides a brief overview of the
content.</p>
</div>
</div>
<div class="sidebar">
<p>This section contains additional information, such as the blog's purpose or a short bio of
the author.</p>
</div>
</div>
</body>
</html>
Output: