E - Commerce Unit - 4
E - Commerce Unit - 4
Designing a home page, HTML document, Anchor tag Hyperlinks, Head and body section, Header Section, Title,
Prologue, Links, Colorful Pages, Comment, Body Section, Heading Horizontal Ruler, Paragraph, Tabs, Images And
Pictures, Lists and Their Types, Nested Lists, Table Handling.
BASICS OF HTML
Html stands for hyper text markup language, basically it is used to develop the web pages.
Here the word markup refers to the highlighted instance of the given aspects. i.e. an author can highlight a
particular word of his written document to grab the attention of the readers.
In the similar way the hypertext markup language highlights the different views of a given web page in terms
of headers, titles, plain text, images, sounds, videos and etc.
In Html, all these can be performed with the help of tags, where a tag is nothing but a special keyword
supported by Html which indicates in between < , > symbols.
Creating an Html
1. Html code should be taken in any text editor, like notepad, etc.
2. Every html code should begins with <html> and must be ends with </html>
3. The text will be placed using the structure of html code.
4. After completion of the code, save the file using the extension “ .htm” or “.html”ex:
filename.html
5. The output of the file can be viewed using the “filename.html” on any available web browsers in our
computer, like Internet explorer, firefox, etc.
6. If the browser is not displaying your expected output it means that the html code is carries some errors.
Then we should be sufficiently debugged the program with our required output appears.
7. It has to be notice that the html is not a case sensitive, i.e. we can write the code in upper case letters or
in lower case letters.
HyperText
Hypertext means that some text in the HTML document carries a link to a different location. Such links
can be present either on the same page or some other page located on another computer page. On clicking this
'hot spot', the viewer is transferred to that location.
Markup:
Markup means that specific portions of a document are marked up to indicate how they should be
displayed in the browser.
HTML carries information about the web page though, the display of the document is solely dependent on
the browser. For this reason, you should test your HTML code in the two most used browsers, Internet Explorer
from Microsoft and Netscape Communicator from Netscape. With HTML you can embed various objects such as
images, video, sound in your pages.
Tags:
In HTML, the commands or instructions are given in the form of tags. That is HTML formattingis specified by
using tags.A tag is a format name surrounded by angle brackets. HTML markup tags are usually called HTML
tags
HTML tags are keywords surrounded by angle brackets like <html>
Prepared by
Patan Arifoon.,MCA(M.Tech)
UGC- NET & APSET QUALIFIED
I BCOM- 2ND SEM NAGARJUNA DEGREE COLLEGE FOR WOMEN,
E -COMMERCE & WEB DESIGNING KADAPA
HTML tags normally come in pairs like <b> and </b>
The first tag in a pair is the start tag, the second tag is the end tag
Start and end tags are also called opening tags and closing tags.
They are not case sensitive: <HEAD>, <head>, and <hEaD> are equivalents;
White space, tabs, and new lines are ignored by the browser, they can be used to makethe HTML
source more readable without affecting the way that the page is displayed
Actually they’re not ignored, but multiple white spaces are replaced by a single spacewhile new lines and tabs
are treated as spaces.
If a browser doesn’t understand a tag it will usually ignore it.
Tags instruct the browser how to display HTML document code.
It consists of a keyword enclosed within angular brackets ( < > ).
Types of tags
In general there are two types of tags.
1. Empty tags / single tags
2. Container tags
1. Empty tags : Empty tag represents the formatting options of text such as the line breaks, horizontal ruler,
paragraph and etc..
These tags has only single tag, mentioned as the start tag.Ex: <br>, <hr>
2. Container tags : Container tag has a section of text, which specifies the formatting construction for all
of the selected text. Container tag has two tags representing the starttag and close tag. At the end tag it
representing the addition of forward slash before the tag element.
Ex : <html> …. </html>
<body> …. </body>
<b> …. </b>
Advantages of HTML:
Disadvantages of HTML:
1. It can create only static and plain pages so if we need dynamic pages then HTML is not useful.
2. Need to write lot of code for making simple webpage.
3. Security features are not good in HTML.
4. If we need to write long code for making a webpage then it produces some complexity
Prepared by
Patan Arifoon.,MCA(M.Tech)
UGC- NET & APSET QUALIFIED
I BCOM- 2ND SEM NAGARJUNA DEGREE COLLEGE FOR WOMEN,
E -COMMERCE & WEB DESIGNING KADAPA
Q) Structure of HTML Program
All HTML documents follow the same basic structure. They have the root tag as <html>, which contains
<head> tag and <body> tag. The head tag is used for control information by the browser and the body tag contains
the actual user information that is to be displayed on the screen. The basic document is shownbelow.
<html> tag:
The <html> tag encloses all other HTML tags and associated text within your document. It is an optional tag.
You can create an HTML document with this tag and your web browser can still read it and display it.But it is
always a good form to include the start and end tags.
<head> tag:
This tag comes after the HTML start tag. It contains <title> tag to give the document title that displays onthe
browsers title bar at the top.
Example: <title>tutorialtpoint.net</title>
The <head> also consists of <meta> tag.
The <meta> tag provides metadata about the HTML document. Metadata will not be displayed onthe
page, but will be machine parsable.
Meta elements are typically used to specify page description, keywords, author of the document,last
modified and other metadata.
The metadata can be used by browsers (how to display content or reload page), search engines
(keywords), or other web services.
Example:
<head>
<meta charset="UTF-8">
<meta name="description" content="Free Web tutorials">
<meta name="keywords" content="HTML, CSS, XML, JavaScript">
<meta name="author" content="John Doe">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
Prepared by
Patan Arifoon.,MCA(M.Tech)
UGC- NET & APSET QUALIFIED
I BCOM- 2ND SEM NAGARJUNA DEGREE COLLEGE FOR WOMEN,
E -COMMERCE & WEB DESIGNING KADAPA
<body> tag:
This tag contains all the text and graphics of the document at which all the HTML tags that are used forcontrol
and formatting of the tag. The actual content of the webpage are placed in the body section. The tag consists of
various attributes. They are bgcolor, link, alink, vlink, text.
Relative hyperlink :
A link to a webpage within the same website is referred to as relative hyperlink.
Use the following rules with relative links in the HTML pages.
Create relative links between the resources in the same domain.
Because both resources are in the same domain you may skip domain information from the URL
The document / webpage consist of plenty of tags which are used to describe the content of the page. In HTML,
document is structured as blocks of text, each of which can be formatted independently. A block has no meaning
outside of a particular document.
Prepared by
Patan Arifoon.,MCA(M.Tech)
UGC- NET & APSET QUALIFIED
I BCOM- 2ND SEM NAGARJUNA DEGREE COLLEGE FOR WOMEN,
E -COMMERCE & WEB DESIGNING KADAPA
The two major blocks of text in HTML document are the paragraph and heading. All most all text and images
in your document will be part of either a heading or a paragraph.
Attribute Values
Value Description
left Left-align text
right Right-align text
center Center-align text
Stretches the lines so that each line has equal width (like in newspapers and
justify
magazines)
Syntax:
<h1 [align=”left” | “center” | “right”]> ............. </h1>
<h2 [align=”left” | “center” | “right”]>…………….</h2>
<h3 [align=”left” | “center” | “right”]> ............. </h3>
<h4 [align=”left” | “center” | “right”]>……………</h4>
<h5 [align=”left” | “center” | “right”]> ............. </h5>
<h6 [align=”left” | “center” | “right”]>……………</h6>
Prepared by
Patan Arifoon.,MCA(M.Tech)
UGC- NET & APSET QUALIFIED
I BCOM- 2ND SEM NAGARJUNA DEGREE COLLEGE FOR WOMEN,
E -COMMERCE & WEB DESIGNING KADAPA
Ex:
<html>
<head>
<title> NAGARJUNA DEGREE COLLEGE
</title>
</head>
<body>
<!-- this will be displayed in the body of the document -->
Nagarjuna degree college for women, kadapa
</body>
</html>
Example Program
<!DOCTYPE html>
<html>
Prepared by
Patan Arifoon.,MCA(M.Tech)
UGC- NET & APSET QUALIFIED
I BCOM- 2ND SEM NAGARJUNA DEGREE COLLEGE FOR WOMEN,
E -COMMERCE & WEB DESIGNING KADAPA
<head>
<title>Basefont tag</title>
<basefont color="red" size="15" face="arial"> Hi
</head>
<body>
<h2>Example of Basefont tag</h2>
<p>The basefornt tag is not supported in HTML5 use CSS to style the document</p>
</body>
</html>
TEXT: <font>
The text on an HTML page can be used and altered in a number of ways:
The actual text used can be changed to attempt to force the browser or changed to the user wish. Here the text
should be used with <font>.
The text formatting techniques are used to maintain an effective appearance of our web document. He we represent
the formatting techniques to our text using the formatting tags. In html there are number of formatting tags are
available, but they will appear in its compatible web browsers. All these tags are not an empty(single) tags, these
are container tags. So we must close with its close tags.
They are mainly
a) <b>..</b>
This tag is used to display the text in Bold letters.
b) <i> .. </i>
Prepared by
Patan Arifoon.,MCA(M.Tech)
UGC- NET & APSET QUALIFIED
I BCOM- 2ND SEM NAGARJUNA DEGREE COLLEGE FOR WOMEN,
E -COMMERCE & WEB DESIGNING KADAPA
c) <u> .. </u>
e) <big> .. </big>
This tag is used to display the text in BIG letters.
f) <small> .. </small>
This tag is used to display the text in small letters.
g) <strong> .. </strong>
This tag is used to display the text in STRONG letters.
h) <strike> .. </strike>
This tag is used to display the text with strikethrough.
i) <centre> .. </centre>
This tag is used to display the text in centre alignment.
j) <pre> .. </pre>
This tag is used to display the text in pre formatted text.
k) <em>.. </em>
This tag is used to display the text in emphasis.
k) <cite>.. </cite>
This tag is used to display the text in citation.
l) <sup>.. </sup>
This tag is used to display the text in super script letters.
m) <sub>.. </sub>
This tag is used to display the text in sub script letters.
n) <address> .. </address>
This tag is used to display the text as address by line by line.
o) <blink> .. </blink>
This tag is used to display the text in blinking letters.
p) <marquee> .. </marquee>
This tag is used to display the text as scrolling letters.
Prepared by
Patan Arifoon.,MCA(M.Tech)
UGC- NET & APSET QUALIFIED
I BCOM- 2ND SEM NAGARJUNA DEGREE COLLEGE FOR WOMEN,
E -COMMERCE & WEB DESIGNING KADAPA
The list refers to arrange the elements in a group, or to record of short pieces of information arranged in a
specific format. For example, we have a shopping list, list of names of employees, list of names of places,etc.. The
html supports FOUR types of lists.
They are
1. unorder lists
2. order lists
3. miscellaneous lists or Nested lists
4. definition lists
The most common HTML lists are ordered and unordered lists
Unordered Lists
If we intend to display certain text on the webpage with each independent sentence being initiated with out any
sequence, then we represent them using unordered list.
An unordered list starts with the <ul> tag. Each list item starts with the <li> tag, and ends with </li>. The
unordered list ends with </ul> . The list items are marked with bullets (typically small black circles).
Syntax : <ul type=”disc” | “square” | ”circle” >……..</ul>
Example program.
<html>
<head>
<title>unordered list</title>
</head>
<body>
<h1> science courses</h1>
<ul>
<li> B.Sc CPM </li>
<li> B.Sc MEC </li>
<li> B.Sc MPC</li>
<li> B.Sc CBZ</li>
</ul>
</body>
</html>
Ordered Lists
If we intend to display certain text on the webpage with each independent sentence being initiated with in an
order or sequence, then we represent them using ordered list.
An ordered list starts with the <ol> tag. Each list item starts with the <li> tag, and ends with
</li>. The unordered list ends with </ol> .The list items
are marked with numbers.
Syntax : <ol type=”1” | ”a” | “I” start=”n”>
…..
</ol>
Prepared by
Patan Arifoon.,MCA(M.Tech)
UGC- NET & APSET QUALIFIED
I BCOM- 2ND SEM NAGARJUNA DEGREE COLLEGE FOR WOMEN,
E -COMMERCE & WEB DESIGNING KADAPA
(Or)
<ol>
<li> item1 </li>
<li> item2 </li>
<li> item3 </li>
</ol>
Example program :
<html>
<head>
<h1><u> ORDERED LIST</u></h1>
</head>
<body>
<h1> science courses</h1>
<ol>
<li> B.Sc CPM </li>
<li> B.Sc MEC </li>
<li> B.Sc MPC</li>
<li> B.Sc CBZ</li>
</ol>
</body>
</html>
Here in the above example program, we include the attributes to change the list of formats in <ol>.
1. suppose, in the above program the ordered list tag give its attribute like
<ol type = “A” >
Then it gives the list of contents using with a sequence from A to Z.
2. suppose, we give the attribute like
<ol type= “ I” >
Then it gives the list of contents using with roman letter from I to end of list.
Q) COLORS
A web page can be made up colourful by using some colour attributes in the body tag. Here we used to change the
background design of the page, background colours of the page and changing the colours of the text and so on…
Here we can use mainly
Back ground design
Back ground colour
Text colour
2. Background colour :
In general, any colour is the combination of three basic colours. They are rgb (red, green, blue). In html each of
the above colour has a degree from 00 to FF in hexadecimal form that are permits 256 colours can be
maintainable.
We can assume a six digit format, using with #, like #rgb
#000000 to #FFFFFF
If we assign the #00FF00, i.e. red=00, green=FF, blue=00 then it will display green.In this, the base
colors red, green, blue have 256 colours each.
So, we can create 256x256x256 = 1,67,77,216 colors to use.
Prepared by
Patan Arifoon.,MCA(M.Tech)
UGC- NET & APSET QUALIFIED
I BCOM- 2ND SEM NAGARJUNA DEGREE COLLEGE FOR WOMEN,
E -COMMERCE & WEB DESIGNING KADAPA
The background colour of the web page can be selected by assigning the attribute bgcolor inthe <body>.
The general form is <body bgcolor = “colour name”>
Ex: <body bgcolor = “red”>
<body bgcolor = “#FF0000”>
3. Text colour :
The colour of the text in the web page can be selected by assigning a color string to thetext/font attribute.
We can assign the text/font attribute in the <body>.
The general form is <body text/font = “colour name”>
Ex: <body text/font = “red”>
<body text/font = “#FF0000”>
COLORS REPRESENTATION
HTML colors are defined using a hexadecimal notation (HEX) for the combination ofRed,
Green, and Blue color values (RGB).
The lowest value that can be given to one of the light sources is 0 (in HEX: 00). Thehighest
value is 255 (in HEX: FF).
HEX values are specified as 3 pairs of two-digit numbers, starting with a # sign.
Attribute Values
Value Description
color_name Specifies the text color with a color name (like "red")
hex_number Specifies the text color with a hex code (like "#ff0000")
rgb_number Specifies the text color with an rgb code (like "rgb(255,0,0)")
Q) IMAGES
Images are used to increase the visibility and shows the effectiveness of our webpage.
Adding images to the HTML document will arose a sense of interest to the end user.
Including the graphics in a page will make the web more attractive.
Html provides a unique way to include any type of graphic file into the document, but many browsers support
only gif(graphic interchange format), jpg ( joint photographic group) and jpeg (joint photographic expert group)
formats.
The <img> used to embeds an image in an HTML page, here notice that images are not technically inserted
into an HTML page, images are linked to HTML pages.
The <img> tag creates a holding space for the referenced image.
Syntax :
<img src=”URL”|”name”
height=”n” height=”n” [alt=”string”][align=”top”|”center”|”bottom”] [usemap=”URL]>
….
</img>
The <img> tag has mainly two required attributes: src and alt.
Prepared by
Patan Arifoon.,MCA(M.Tech)
UGC- NET & APSET QUALIFIED
I BCOM- 2ND SEM NAGARJUNA DEGREE COLLEGE FOR WOMEN,
E -COMMERCE & WEB DESIGNING KADAPA
src: src stands for source. It refers to the filename of an image. It specifies the URL(uniform resource
locator), where the image is actually stored in the web server or in the computer system.
For example : <img src=”c:\windows\forest.bmp”>
alt : alt stands for alternate. Some browsers can not display images or sometimes it takes long time to
display the image. In such cases, the ALT attribute is used to display an alternate message.
Optional Attributes
1. align : It is used to align or arrange the image on the web page. These values can be
left/right/centre/top/bottom.
2. border : It is used to set the border to an image. The default value is zero.
3. height / width : height and width of the image can be specified using this attribute.These values
can be used in pixels %.
4. hspace / vspace : using this attribute, the white spaces or gaps existing between thetext and the
image can be managed.
5. name : usually, this attribute used to specify the name of the image.
Prepared by
Patan Arifoon.,MCA(M.Tech)
UGC- NET & APSET QUALIFIED
I BCOM- 2ND SEM NAGARJUNA DEGREE COLLEGE FOR WOMEN,
E -COMMERCE & WEB DESIGNING KADAPA
Table Row <tr>: Each row of the table is created using. It has the following form
Syntax : <tr align=”center”|”left”|”right”][valign=”top”|”center”|””bottom]> …. </tr>
<td align=”center”|”left”|”right”][valign=”top”|”center”|””bottom][nowrap][colspan=”n”][rowspan=”n”]>
….
</td>
Syntax :
<th align=”center”|”left”|”right”][valign=”top”|”center”|””bottom][nowrap][colspan=”n”][rowspan=”n”]>
…. </th>
Attribute Description
Align Used to align the contents horizontally
Valign Used to align the content vertically
Nowrap If Nowrap is set the content will not be automatically wrapped as the table is formatted for the screen
Colspan This controls how many columns a text in the table should span
Rowspan This defines the number of rows the text in the table should span
<caption> …… </caption> : This optional element is used to provide a string which describes thecontent
of the table. If used it must immediately follow the table element.
Prepared by
Patan Arifoon.,MCA(M.Tech)
UGC- NET & APSET QUALIFIED