Professional Documents
Culture Documents
Aruni Ansh E-COMMERCE LAB FILE
Aruni Ansh E-COMMERCE LAB FILE
Aruni Ansh E-COMMERCE LAB FILE
OF
E-COMMERCE LAB
1|Page
CERTIFICATE
This is to certify that the practical file titled “E-COMMERCE LAB” submitted by
The assistance rendered during the study has been duly acknowledged.
No part of this work has been submitted for any other degree.
2|Page
ACKNOWLEDGEMENT
Any accomplishment requires the effort of many people and this work is not
different. Regardless of the source, I wish to express my gratitude to those who
may have contributed to this work, even though anonymously.
3|Page
INDEX
S.no. Topic Page No.
4|Page
CHAPTER 1
INTRODUCTION OF HTML WITH BASIC TAG
HTML stands for HyperText Markup Language. It is used to design web pages using a markup
language. HTML is a combination of Hypertext and Markup language. Hypertext defines the
link between web pages. A markup language is used to define the text document within the tag
which defines the structure of web pages.
<!DOCTYPE>: This tag is used to declare the document type and version of HTML
being used. It should be placed at the very beginning of an HTML document.
<html>: This tag represents the root element of an HTML page and contains all other
elements.
<head>: This tag contains metadata about the HTML document, such as the title,
character encoding, and linked style sheets or scripts. It does not appear as visible content
on the web page.
<title>: This tag is placed within the <head> section and defines the title of the web
page, which is displayed in the browser's title bar or tab.
<body>: This tag contains the visible content of the web page, including text, images,
links, and other HTML elements.
<h1> to <h6>: These tags define headings of different levels, with <h1> being the
highest level (most important) and <h6> being the lowest level (least important).
<p>: This tag is used to define a paragraph of text.
<a>: This tag is used to create a hyperlink to another web page or resource. The href
attribute specifies the URL or destination of the link.
<img>: This tag is used to embed an image in the web page. The src attribute specifies
the image file's URL, and the alt attribute provides alternative text that is displayed if the
image cannot be loaded.
<ul> and <li>: These tags are used together to create an unordered list. <ul> represents
the list container, and <li> represents each list item.
<ol> and <li>: These tags are used together to create an ordered (numbered) list. <ol>
represents the list container, and <li> represents each list item.
<div>: This tag is used to group and style elements together or create sections within a
web page.
These are just a few of the basic HTML tags. HTML provides many more tags and
attributes for creating and structuring web pages according to specific requirement.
5|Page
CHAPTER 2
HTML CODE FOR HEADING TAG
<!DOCTYPE html>
<html>
<head>
</head>
<body>
</body>
</html>
OUTPUT
6|Page
CHAPTER 3
HTML CODE TO DEMONSTRATE
A) ORDERED LIST
B) UNORDERED LIST
C) NESTED LIST
A) Ordered list
<!DOCTYPE html>
<html>
<body>
<ol>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
</body>
</html>
OUTPUT
7|Page
B) Unordered list
<!DOCTYPE html>
<html>
<body>
<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
</body>
</html>
OUTPUT
8|Page
C)Nested list
<!DOCTYPE html>
<html>
<body>
<ul>
<li>Coffee</li>
<li>Tea
<ul>
<li>Black tea</li>
<li>Green tea</li>
</ul>
</li>
<li>Milk</li>
</ul>
</body>
</html>
OUTPUT
9|Page
CHAPTER 4
HTML CODE TO INSERT AN IMAGE IN THE WEBPAGE
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<img src="https://media-cdn.tripadvisor.com/media/photo-s/16/e0/7b/c2/picture-clicked-at-
the.jpg" alt="India gate" width="300" height="200">
</body>
</html>
OUTPUT
10 | P a g e
CHAPTER 5
HTML CODE TO DESIGN TABLES WITH DIFFERENT
STYLES
<!DOCTYPE html>
<html>
<head>
<style>
</style>
</head>
<body>
<p>For zebra-striped tables, use the nth-child() selector and add a background-color to all even
(or odd) table rows:</p>
<table>
<tr>
<th>First Name</th>
<th>Last Name</th>
<th>Points</th>
</tr>
<tr>
<td>Aruni</td>
<td>Ansh</td>
11 | P a g e
<td>$100</td>
</tr>
<tr>
<td>Drinshadeep</td>
<td>Sharma</td>
<td>$150</td>
</tr>
<tr>
<td>Vikram</td>
<td>Saha</td>
<td>$300</td>
</tr>
<tr>
<td>Rajat</td>
<td>Kumar</td>
<td>$250</td>
</tr>
<tr>
<td>Jaya</td>
<td>Kohli</td>
<td>$500</td>
</table>
</body>
</html>
OUTPUT
12 | P a g e
CHAPTER 6
EXPLAIN HYPERLINK ALSO WRITE HTML CODE TO
EXPLAIN ANCHOR TAG
A hyperlink, also known as a link, is a reference or connection between two web pages. It allows
users to navigate from one webpage to another by clicking on the hyperlink. Hyperlinks are an
essential part of the web, enabling the interconnected nature of websites.
In HTML, hyperlinks are created using the <a> (anchor) tag. The anchor tag is an inline element
that can contain text or other HTML elements. It is used to define the beginning and end of a
hyperlink, and it requires a href attribute to specify the destination URL.
<!DOCTYPE html>
<html>
<body>
</body>
</html>
OUTPUT
13 | P a g e
CHAPTER 7
HTML CODE TO DESIGN SIGN UP FORM
<!DOCTYPE html>
<html>
<style>
* {box-sizing: border-box}
input[type=text], input[type=password] {
width: 100%;
padding: 15px;
display: inline-block;
border: none;
background: #f1f1f1;}
input[type=text]:focus, input[type=password]:focus {
background-color: #ddd;
outline: none;}
hr {
margin-bottom: 25px;}
button {
background-color: #04AA6D;
color: white;
14 | P a g e
margin: 8px 0;
border: none;
cursor: pointer;
width: 100%;
opacity: 0.9;}
button:hover {
opacity:1;}
.cancelbtn {
background-color: #f44336;}
.cancelbtn, .signupbtn {
float: left;
width: 50%;}
.container {
padding: 16px;}
/* Clear floats */
.clearfix::after {
content: "";
clear: both;
display: table;}
/* Change styles for cancel button and signup button on extra small screens */
15 | P a g e
</style>
<body>
<div class="container">
<h1>Sign Up</h1>
<hr>
<label for="email"><b>Email</b></label>
<label for="psw"><b>Password</b></label>
<label>
</label>
<p>By creating an account you agree to our <a href="#" style="color:dodgerblue">Terms &
Privacy</a>.</p>
<div class="clearfix">
</div>
</div>
</form>
</body>
</html>
16 | P a g e
OUTPUT
17 | P a g e
CHAPTER 8
DEFINE ROWSPAN & COLSPAN WITH HTML CODE
COLSPAN WITH HTML CODE:
<!DOCTYPE html>
<html>
<head>
<style>
table, th, td {
border-collapse: collapse;
</style>
</head>
<body>
<p>To make a cell span more than one column, use the colspan attribute.</p>
<table style="width:100%">
<tr>
<th colspan="2">Name</th>
<th>Age</th>
</tr>
<tr>
<td>Aruni</td>
<td>Ansh</td>
<td>18</td>
</tr>
18 | P a g e
<tr>
<td>Jaya</td>
<td>Kohli</td>
<td>23</td>
</tr>
</table>
</body>
</html>
OUTPUT
19 | P a g e
ROWSPAN WITH HTML CODE
<!DOCTYPE html>
<html>
<head>
<style>
table, th, td {
border-collapse: collapse;
</style>
</head>
<body>
<p>To make a cell span more than one row, use the rowspan attribute.</p>
<table style="width:100%">
<tr>
<th>Name</th>
<td>Aruni</td>
</tr>
<tr>
<th rowspan="2">Phone</th>
<td>555-1234</td>
</tr>
<tr>
<td>555-8745</td>
</tr>
20 | P a g e
</table>
</body>
</html>
OUTPUT
21 | P a g e
CHAPTER 9
HTML CODE TO DESIGN PERSONAL PROFILE
<!DOCTYPE html>
<html>
<head>
<style>
.card {
max-width: 300px;
margin: auto;
text-align: center;
font-family: arial;
}.title {
color: grey;
font-size: 18px;
button {
border: none;
outline: 0;
display: inline-block;
padding: 8px;
color: white;
background-color: #000;
text-align: center;
22 | P a g e
cursor: pointer;
width: 100%;
font-size: 18px;
a{
text-decoration: none;
font-size: 22px;
color: black;
button:hover, a:hover {
opacity: 0.7;
</style>
</head>
<body>
<div class="card">
<h1>John Doe</h1>
<p>Harvard University</p>
23 | P a g e
</div>
<p><button>Contact</button></p>
</div>
</body>
</html>
OUTPUT
24 | P a g e
CHAPTER 10
HTML CODE TO DESIGN A WEBPAGE FOR INSURANCE
COMPANY
<!DOCTYPE html>
<html>
<head>
<title>Insurance Company</title>
<style>
body {
background-color: #f2f2f2;
margin: 0;
padding: 20px;}
.container {
max-width: 960px;
margin: 0 auto;
background-color: #ffffff;
padding: 20px;
border-radius: 5px;
h1, h2 {
color: #333333;
margin: 0;}
p{
.jumbotron {
25 | P a g e
background-image: url("insurance-banner.jpg");
background-size: cover;
color: #ffffff;
text-align: center;
padding: 100px;}
.jumbotron h1 {
font-size: 48px;
margin: 0;}
.jumbotron p {
font-size: 24px;
margin-bottom: 30px;}
.features {
display: flex;
justify-content: space-between;
margin-top: 50px;}
.feature {
flex-basis: 30%;
text-align: center;
padding: 20px;
border-radius: 5px;
background-color: #f9f9f9;}
.feature h2 {
font-size: 24px;
margin: 0;}
.feature p {
font-size: 16px;
26 | P a g e
margin-bottom: 20px;}
</style>
</head>
<body>
<div class="jumbotron">
</div>
<div class="container">
<h2>About Us</h2>
<p>
XYZ Insurance is a leading insurance company committed to delivering exceptional service and
comprehensive coverage to our clients. With years of experience in the industry, we understand
the importance of protecting what matters most to you.
</p>
<div class="features">
<div class="feature">
<h2>Auto Insurance</h2>
<p>Stay protected on the road with our customizable auto insurance plans.</p>
</div>
<div class="feature">
<h2>Home Insurance</h2>
<p>Protect your home and belongings with our reliable home insurance policies.</p>
</div>
<div class="feature">
27 | P a g e
<h2>Life Insurance</h2>
<p>Ensure the financial security of your loved ones with our life insurance options.</p>
</div>
</div>
</div>
</body>
</html>
OUTPUT
28 | P a g e
CHAPTER 11
HTML CODE TO DESIGN AN ONLINE SHOPPING FORM
<!DOCTYPE html>
<html>
<head>
<style>
body {
background-color: #f2f2f2;
margin: 0;
padding: 20px;}
.container {
max-width: 500px;
margin: 0 auto;
background-color: #ffffff;
padding: 20px;
border-radius: 5px;
h1, h2 {
color: #333333;
margin: 0;
p{
29 | P a g e
label {
display: block;
font-weight: bold;
margin-bottom: 5px;
width: 100%;
padding: 10px;
border-radius: 5px;
margin-bottom: 10px;}
input[type="submit"] {
background-color: #4CAF50;
color: #ffffff;
border: none;
border-radius: 5px;
cursor: pointer;}
input[type="submit"]:hover {
background-color: #45a049;}
</style>
</head>
<body>
<div class="container">
30 | P a g e
<label for="name">Name:</label>
<label for="email">Email:</label>
<label for="address">Address:</label>
<label for="product">Product:</label>
</select>
<label for="quantity">Quantity:</label>
</form>
</div>
</body>
</html>
OUTPUT
31 | P a g e
CHAPTER 12
EXPLAIN FORM WITH HTML CODE
<!DOCTYPE html>
<html>
<body>
<h2>HTML Forms</h2>
<form action="/action_page.php">
</form>
<p>If you click the "Submit" button, the form-data will be sent to a page called
"/action_page.php".</p>
</body>
</html>
OUTPUT
32 | P a g e
In this example, we have a simple form that collects the user's name, email, and message. Let's
break down the different components of the form:
<form>: This is the opening tag that starts the form. It contains the action attribute, which
specifies the URL or endpoint where the form data should be submitted. The method attribute
specifies the HTTP method to be used for submitting the form, such as GET or POST.
<label>: This tag represents a label for an input field. It is associated with an input field using the
for attribute, which should have the same value as the id attribute of the corresponding input
field. Labels provide a description or prompt for the input field.
<input>: This tag represents an input field where users can enter data. The type attribute
specifies the type of input field, such as text, email, password, checkbox, etc. The name attribute
provides a name for the input field, which is used to identify the input when the form is
submitted.
<textarea>: This tag represents a multiline text input field. It allows users to enter longer
messages or comments. The name attribute is used to identify the textarea when the form is
submitted, and the rows attribute determines the visible height of the textarea.
<input type="submit">: This tag creates a submit button that users can click to submit the form.
The value attribute specifies the text that appears on the button.
When a user fills out the form and clicks the submit button, the browser sends a request to the
URL specified in the action attribute of the form. The method specified in the method attribute
determines how the data is sent (e.g., as query parameters in the URL for or as a separate data
payload for . The server-side script or application at the specified URL can then process the form
data and take appropriate actions based on the submitted information.
33 | P a g e
CHAPTER 13
EXPLAIN FRAME WITH HTML CODE
<!DOCTYPE html>
<html>
<head>
<title>My Frameset</title>
</head>
<frame src="menu.html">
<frame src="content.html">
</frameset>
</html>
OUTPUT
34 | P a g e
In this example, we have a frameset that contains two frames. Let's break down the different
components:
<frameset>: This is the container element used to define the frames within a web page. It can
specify the layout of the frames using attributes like cols or rows to determine the width or
height distribution of the frames.
<frame>: This element defines an individual frame within the frameset. The src attribute
specifies the URL of the HTML document that should be displayed within the frame. The
<frame> element can have additional attributes like name, scrolling, frameborder, etc., to control
various aspects of the frame's behavior and appearance.
In the example, the frameset is divided into two columns using the cols attribute. The first
column takes up 25% of the frameset's width, and the second column takes up 75%. Within each
column, a <frame> element is used to specify the source of the HTML documents to be
displayed.
It's important to note that frames are an older HTML feature and are no longer recommended for
modern web development. They have been deprecated in HTML5 in favor of more flexible and
accessible layout techniques such as CSS, grids, and responsive design. Frames can introduce
usability and accessibility issues, so it's generally recommended to use alternative methods for
dividing and organizing web content.
35 | P a g e
CHAPTER 14
DESIGN A STATIC WEBSITE OF 5 TO 10 PAGES
<!DOCTYPE html>
<html>
<head>
<title>Contact Us</title>
<style>
body {
background-color: #f2f2f2;
margin: 0;
padding: 20px;}
.container {
max-width: 960px;
margin: 0 auto;
background-color: #ffffff;
padding: 20px;
border-radius: 5px;
h1 {
color: #333333;
margin: 0;
p{
margin: 10px 0;
36 | P a g e
}
</style>
</head>
<body>
<div class="container">
<h1>Contact Us</h1>
<p>Email: info@example.com</p>
<p>Phone: 123-456-7890</p>
</div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>Services</title>
<style>
body {
background-color: #f2f2f2;
margin: 0;
padding: 20px;
.container {
max-width: 960px;
37 | P a g e
margin: 0 auto;
background-color: #ffffff;
padding: 20px;
border-radius: 5px;
h1 {
color: #333333;
margin: 0;
p{
margin: 10px 0;
ul {
margin: 10px 0;
padding-left: 20px;}
li {
margin-bottom: 5px;
</style>
</head>
<body>
<div class="container">
<h1>Our Services</h1>
<ul>
<li>Web Design</li>
38 | P a g e
<li>Graphic Design</li>
<li>SEO Services</li>
<li>E-commerce Solutions</li>
</ul>
</div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>Testimonials</title>
<style>
body {
background-color: #f2f2f2;
margin: 0;
padding: 20px;}
.container {
max-width: 960px;
margin: 0 auto;
background-color: #ffffff;
padding: 20px;
border-radius: 5px;
39 | P a g e
h1 {
color: #333333;
margin: 0;
.testimonial
OUTPUT
40 | P a g e
THANK YOU
41 | P a g e