Ecom File
Ecom File
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My First Web Page</title>
</head>
<body bgcolor="#f0f0f0" text="#333333">
<h1><font face="Arial" size="6" color="blue">My First Web Page</font></h1>
<p><font face="Verdana" size="4" color="green">Welcome to my first web page!</font></p>
<p><font face="Helvetica" size="3" color="black">This page demonstrates the use of various
attributes of the font tag to style text.</font></p>
<p><font face="Times New Roman" size="3" color="red">Feel free to explore!</font></p>
</body>
</html>
Output
2. Create an HTML document giving details of your [Name, Age], [Address, Phone] and [Register
Number, Class] aligned in the proper order using alignment attributes of the Paragraph tag.
!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Personal Details</title>
</head>
<body>
<h1>Personal Details</h1>
</body>
</html>
Output
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Styled Heading and Paragraph</title>
<style>
/* CSS for styling */
h1 {
color: #333; /* Heading color */
font-family: Arial, sans-serif; /* Heading font family
*/ font-size: 24px; /* Heading font size */
text-decoration: underline; /* Heading underline */
}
p{
color: #666; /* Paragraph color */
font-family: Arial, sans-serif; /* Paragraph font family
*/ font-size: 16px; /* Paragraph font size */
line-height: 1.5; /* Paragraph line height */
}
</style>
</head>
<body>
</body>
</html>
Output
4. Write HTML code to create a Web Page that contains an Image at its center.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Centered Image</title>
<style>
/* Style for the container */
.container {
display: flex; /* Use flexbox for centering */
justify-content: center; /* Center horizontally
*/ align-items: center; /* Center vertically */
height: 100vh; /* Full viewport height */
}
</body>
</html>
Output
5. Create a web page with an appropriate image towards the left-hand side of the
page, when the user clicks on the image another web page should open.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Image Link</title>
</head>
<body>
</body>
</html>
Output-
6. Create web Pages using an Anchor tag with its attributes for external links.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>St. Andrews Institute</title>
</head>
<body>
<!-- Anchor tag for external link -->
<a href="https://saitm.ac.in/">St. Andrews Institute</a>
</body>
</html>
Output
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>St. Andrews Institute</title>
</head>
<body>
<!-- Anchor tag with target attribute for external link -->
<a href="https://saitm.ac.in/" target="_blank">St. Andrews Institute (Opens in New Tab)</a>
</body>
</html>
Output
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>St. Andrews Institute</title>
</head>
<body>
<!-- Anchor tag with title attribute for external link -->
<a href="https://saitm.ac.in/" title="St. Andrews Institute">Hover to see tooltip</a>
</body>
</html>
Output
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>St. Andrews Institute</title>
<style>
/* Style for the link */
.external-link {
color: Red;
text-decoration: underline;
}
</style>
</head>
<body>
<!-- Anchor tag with class attribute for external link -->
<a href="https://saitm.ac.in/" class="https://saitm.ac.in/course/bachelor-of-business-administration/">St. Andrews
Institute</a>
</body>
</html>
Output
7. Create a web page for internal links; when the user clicks on different links on
the web page it should go to the appropriate locations/sections on the same page.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>COURSE</title>
<style>
/* Style for the sections */
section {
margin-bottom: 20px; /* Add some space between sections */
}
<section id="BBA">
<h2>BBA</h2>
<p>Bachelor of Business Administration or BBA at SAITM is one of the trending bachelor’s
degree programs that students opt for after completing school. The Bachelor of Business
Administration (BBA) course offered by SAITM is comprehensive and inclusive of various
aspects of new-age learning.</p>
<p><a href="#top">Back to Top</a></p>
</section>
<section id="BCA">
<h2>BCA</h2>
<p>The Bachelor of Computer Applications (BCA) program is a highly sought-after degree in
the field of computer science. BCA is an undergraduate program that offers a comprehensive
understanding of computer applications and equips students with the necessary skills to excel in
the ever-evolving world of technology.</p>
<p><a href="#top">Back to Top</a></p>
</section>
<!-- Anchor for top -->
<p id="top"><a href="#">Back to Top</a></p>
</body>
</html>
Output
8. Write an HTML code to create a web page with a pink color background and
display moving messages in red color.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Moving Messages</title>
<style>
/* Style for the body */
body {
background-color: #ffcccc; /* Pink background color */
overflow: hidden; /* Hide overflow content */
position: relative; /* Set position relative */
}
</body>
</html>
Output
9. Create a web page, showing an ordered list of all sixth-semester courses
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>BBA Sixth (6th) Semester Courses</title>
</head>
<body>
<h1>BBA Sixth (6th) Semester Courses</h1>
<ol>
<li>Income Tax</li>
<li>System Analysis and Design</li>
<li>Foundations of International Business</li>
<li>Consumer Protection</li>
<li>E-Commerce</li>
<!-- Add more courses as needed -->
</ol>
</body>
</html>
Output
10. Create an HTML document containing a nested list showing a content page of
any book.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Book Content Page</title>
</head>
<body>
<h2>Contents</h2>
</body>
</html>
Output -