Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
11 views

Notes HTML Internet

Uploaded by

Ashwina Verma
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Notes HTML Internet

Uploaded by

Ashwina Verma
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 47

UNIT- 1: Internet Basics

UNIT STRUCTURE
1.0 Objective
1.1 Concept of Internet
1.2 Evolution of internet
1.3 Basic concepts
1.4 Communication on the Internet
1.5 Internet Domains
1.6 Internet Server Identities
1.7 Establishing Connectivity on Internet
1.8 Client IP Address
1.9 TCP/IP and its Services
1.10 Web Server
1.11 Web Client
1.12 Domain Registration
1.13 Summary
1.14 Question for Exercise
1.15 Suggested Readings

1.0 Objective
Defense Advanced Research Project Agency (DARPA) of US initiated a research activity that
eventually developed as a system for global data communication service known as the Internet.
The internet, today, is being operated as a joint effort of many different organizations. In this
unit, you will learn the basic concepts related to internet as well as the various mechanisms and
technologies involved in the deployment of the internet. Upon completion of this unit, the
readers shall be aware of the basic terms and terminologies, involved devices and mechanisms
and the applications of the Internet.

1.1 Concept of Internet


The Internet is “the global system of interconnected computer networks that use the Internet
protocol suite (TCP/IP) to link devices worldwide.” It has changed the way we do our daily
chores. The usual tasks that we perform like sending an email, looking up train schedules, social
networking, paying a utility bill is possible due to the Internet. The structure of internet has
become quite complex and it cannot be represented as it is changing instantaneously. Every now
and then some resources are being added while some are being removed. Internet comprises of
various networks that include public, private, government, business, and academic sectors linked
together using different electronic technologies. It interconnects global networks with local and
vise-versa. The resources of Internet range in both information (including digital documents like
image, video, text etc.) and services (including information sharing, email, and video
conferencing) domains.

Though the terms Internet and World Wide Web are used interchangeably in lay man terms they
are not the same. It is common practice to say "going on the Internet" whenever we open any
web page on a browser. However, the World Wide Web or the Web is one of the most popular
Internet services available. The Web is a collection of interconnected documents (web pages)
and other web resources, linked by hyperlinks and URLs. It uses HTTP as an underlying
protocol for information transfer which is one of the several other protocols available in
networking theory.

1.2 Evolution of Internet


The Defense Department of US, in 1969, funded a research project for developing a robust
network that should be resilient to even bombing. The main objective was to develop a network
that should be secure and robust enough to withstand even a nuclear attack. This project was
named as the ARPANET. The idea was to have a distributed network in order to avoid attacks on
the central authority. This led to the development of Local Area Network (Local Area Network)
and workstations equipped with the ability to connect to the Ethernet. These local area networks
were eventually connected to the ARPANET. The distributed aspect of the ARPANET catalysed
the rapid evolution of the ARPANET over the next decade. Initially, ARPANET used National
Control Protocol (NCP) as the standard set of rules defining the communication between the
computers connected to ARPANET. However, owing to the rapid development of the information
technology, NCP was replaced by the Transmission Control Protocol/Internet Protocol (TCP/IP).
The TCP protocol fragments the messages into packet streams at the source and performs
reassembly of these packets at the destination. The transmission of these packets from source to
destination is handled by the IP. The IP protocol takes care of the addressing conventions and
ensures the delivery of the packet at the destination across multiple nodes or even multiple
networks. The agile nature of the TCP/IP protocol in handling the communication across multiple
heterogeneous networks attracted the other networks to connect to the ARPANET and employ
TCP/IP as their underlying communication protocol. Eventually, the ARPANET developed into a
large network of networks and is now called as ‘Internet’.

1.3 Basic Concept

1.3.1 What is the Internet?

The Internet is a global collection of computer networks that are linked together by devices
called routers and use a common set of protocols for data transmission known as TCP/IP
(transmission control protocol / Internet protocol). The primary purpose of the Internet is to
facilitate the sharing of information. There are many different tools used on the Internet to make
this possible. Some of the more common tools include email, list servers, newsgroups, telnet,
gopher, FTP, and the World Wide Web. Probably the most popular of all Internet tools is the
World Wide Web.

1.3.2 What is the World Wide Web (WWW)?


WWW stands for World Wide Web. A technical definition of the World Wide Web is − All the
resources and users on the Internet that are using the Hypertext Transfer Protocol HTTP. The
World Wide Web is the universe of network-accessible information, an embodiment of human
knowledge. The World Wide Web is a way of exchanging information between computers on the
Internet, tying them together into a vast collection of interactive multimedia resources. It is a
hypertext interface to internet information resources.
Internet and Web is not the same thing: Web uses internet to pass over the information.

1.3.3 Basic WWW Concepts


The World Wide Web is a way of exchanging information between computers on the Internet,
tying them together into a vast collection of interactive multimedia resources. It is a hypertext
interface to internet information resources.

1.3.3.1 HTTP

HTTP is the short form for Hypertext Transfer Protocol. An example of the standard URL is
http://www.google.com. The prefix http in the URL designates the protocol being used for
communication. The HTTP protocol is used to access hypertext documents on the World Wide
Web.

1.3.3.2 URL

URL refers to Uniform Resource Locator. URLs are used as the address of the documents
available on the World Wide Web. A URL is the fundamental identifier of any resource available
on the web e. g., hypertext pages, images, and sound files. The standard format of a URL has
been specified as –
protocol://hostname/other_information

A protocol is, basically, a specification of the flow of information in a network. The protocol
required for accessing the resources available on the web is called Hyper Text Transfer Protocol
(HTTP). Other protocols supported by the web browsers include telnet, FTP, Gopher, etc. The
name of the protocol is followed by a colon, two forward slashes, and then the hostname. The
hostname refers to the computer having the requested resource. Hostname is followed by a single
forward slash and links to subdirectories or any particular file. The path to the directory holding
the requested file or resource may contain single forward slashes.

1.3.3.3 Website

Website refers to a collection of web pages usually written in markup language. For example:
www.google.com refers to the website of Google having ‘com’ as the domain name. Websites
can be understood as a location on the World Wide Web that holds the resources which people
can request when required. The first or the initial page of any website is known as the home page
of that particular website.

1.3.3.4 Web Server

Websites are usually hosted on a computer which is known as a Web server. These servers
should require constant connectivity with the internet so that the resources stored by them can be
accessed from anywhere in the world. A web server is provided with a unique address which is
required to access the contents of the server. The unique address is the identifier for the server
and is termed as IP Address. These IP Addresses comprise of a series of four numbers separated
by dots or periods. Each number lies between the range of 0 – 255, for example: 192.168.1.1. IP
address of the web server is also required when the URL of the website hosted on that server is
registered on the World Wide Web.

1.3.3.5 Web Browser

Web Browser is a software required to access the resources available on the World Wide Web.
Hence, in order to access any website web browser is required. Examples of web browsers are:
Microsoft Internet Explorer, Google Chrome, Mozilla Firefox, Netscape Navigator, etc.
Navigating through the pages of a website is termed as web browsing or surfing.

1.3.3.6 ISP

ISP is the short form for Internet Service Provider. They are basically the organizations
responsible for providing internet connections to the subscribers. Several ISPs also provide space
on their web servers for hosting website of the subscribers.

1.3.3.7 HTML

HTML refers to Hyper Text Markup Language. It is the development language of the websites
available on the web. HTML can be understood as a subset of SGML (Standard Generalized
Mark-Up Language).

1.3.3.8 Hyperlink

Hyperlinks can be understood as the access points to other resources of the same or different
websites. A hyperlink, sometimes referred to as a link, is a clickable element in an electronic
document used to navigate through the linked resources. Typically, you click the hyperlink to
access the linked resource. Hyperlinks can be in the form of clickable textual links, icons,
buttons, etc.

1.3.3.9 DNS

DNS is the short form for Domain Name System. It is used to provide a mapping between the
name of the requested website and its IP address. Usually, user remembers the name or URL of a
website. When user enters this URL in the web browser, a request is sent to DNS for resolving
the entered URL in terms of its IP address. It is the IP address which will be used to locate the
requested resource on the web. The mapping of the URL and the IP address a website is usually
built during the registration of the domain name.

1.3.3.10 W3C

W3C (World Wide Web Consortium) is an international organization comprising of full-time


staff, member organizations, and the public for the development of Web standards. The inventor
of W3C is Tim Berners-Lee while CEO Jeffrey Jaffe is the CEO of W3C. The main aim of the
W3C community is to streamline the development of the open standards for the web. The
mission of W3C's is to shape the Web to its full potential. W3C is also one of the main standards
body for HTTP and HTML.
1.3.3.11 CLIENTS AND SERVERS
A host machine that requests for a resource on the Internet is treated as client. The machine
and/or software that manages and replies these requests are called as servers. There are different
types of clients like email client, web client, FTP client the corresponding servers are Email
server, web server and FTP server.

1.3.4 IP Addressing
IP addresses refer to the unique identifier associated with each computer on the internet. These
addresses are also called logical address and are used to uniquely identify the communicating
entities on the internet. IP addresses are provided and managed by the Internet Protocol at the
network layer of the OSI model. IP addresses can be of two types: IPv4 and IPv6.
IPv4 uses a 32-bit address having the address space equal to 232. An address space refers to the
total number of addresses that can be used by the protocol. Figure 1.2 shows the format of an
IPv4 address. Two types of notations have been used to represent an IPv4 addresses:
Binary notation: In this notation, the IPv4 address is represented as sequence of 32 bits divided
into 4 octets. Each octet refers to eight bits or 1 byte. Thus, IPv4 addresses are sometimes
referred to as 4-byte address. Eg: 01110101 10001010 000011101 00000010
Dotted-Decimal notation: In order to facilitate easy reading of the IP addresses, they are
sometimes written as a sequence of decimal numbers with each byte separated by a period or dot
(.). Eg: 192.168.1.10.
These IPv4 addresses employ the concept of classes. The strategy to classify the address space
into classes is known as classful addressing. This mechanism splits the address space into 5
classes: A, B, C, D, and E. Examining the first few bits of the binary notation or the first byte of
the dotted-decimal notation of the IPv4 address can help in identifying the class to which the
address belongs. Table 1.1 shows the different classes of IP.
In classful addressing, an IPv4 address is composed of two parts: network id and host id. The
length of these parts vary with respect to the corresponding class. This concept is applicable only
for the addresses of class A, B, and C. For the addresses belonging to class A, the first byte
corresponds to network id while the remaining 3 bytes refer to host id. Similarly, for class B, the
first two bytes refer to network id while the remaining two bytes refer to host id. Finally, for
class C, the first three bytes refer to network id while the remaining one byte indicates host id.
It is the responsibility of the Internet Service Provider (ISP) to assign the IP addresses to the
computers communicating on the internet so as to identify the country or region from which a
computer is connecting to the WEB. The assignment of an IP address may be wither dynamic or
static.
Static assignment of IP addresses corresponds to the manual configuration of IP address on the
computers. However, a dynamic assignment employs a DHCP server that has been configured to
automatically provide IP addresses to the connected hosts.
Class Range Binary Notation Dotted Decimal Notation
From To (Range of First Byte)
Class A 1.0.0.0 127.255.255.255 0xxxxxxx xxxxxxxx 0-127
xxxxxxxx xxxxxxxx
Class B 128.0.0.0 191.255.255.255 10xxxxxx xxxxxxxx 128-191
xxxxxxxx xxxxxxxx
Class C 192.0.0.0 192.255.255.255 110xxxxx xxxxxxxx 192-223
xxxxxxxx xxxxxxxx
Class D 224.0.0.0 224.255.255.255 1110xxxx xxxxxxxx 224-239
xxxxxxxx xxxxxxxx
Class E 240.0.0.0 240.255.255.255 1111xxxx xxxxxxxx 240-255
xxxxxxxx xxxxxxxx
Table 1.1: IP address classes
A Router has more than one IP address because router connects two or more different networks.
But A computer or host can only have one and a unique ip address. A routers function is to
inspect incoming packet and determine whether it belongs to local network or to a Remote
Network, if a local packet is determined then there is no need of routing and if a Remote packet
is determined then it will route that packet according to the routing table otherwise the packet
will be discarded. Figure 1.1 shows the format of an IPv4 Address.

Figure 1.1: IPv4 Address Format

1.4 Communication on the Internet


TCP/IP is the only protocol used to send data all around the Internet. TCP/IP is actually two
individual sections, (TCP) a set of communication protocols and (IP) a unique address. Every
machine connected to the Internet must have an address by which it can be located on the
Internet. This is called the IP address of the machine. For the Internet to function smoothly, no
two machines can have the same IP address. Hence each machine connected to the Internet must
have a unique IP address, which identifies that machine.

The Internet is a worldwide network of networks. As the Internet grew over the years it became
increasingly important to have a governing body, which allocated unique IP addresses to
organizations linked to the Internet. An international body called InterNIC, located in the USA,
is responsible for registering and assigning unique IP addresses to organizations wishing to
manage networks, which will be part of the Internet. A unique IP address therefore points to an
actual computer connected via a gateway to the Internet. This computer is known as a Domain
i.e. a place where information is available. This is a Physical Domain on the Internet.
Conceptually, a Server, which has a permanent IP address (i.e. a Physical Domain), can provide
the following:
 A gateway to other computers to access the Internet
 Information for Internet clients to read
 A physical location on which several Virtual Domains can be hosted
In many cases, when a Web Site provides Internet clients information to read, the site is mounted
as a Virtual Domain on an Internet Server, which is its (host) Physical Domain.
Virtual Domains are identified by a name (e.g. www.microsoft.com). Just like a Physical
Domain needs to have a unique IP address, Virtual Domain Names also need to be unique on the
Internet. All Virtual Domain Names must be registered with InterNIC. One Internet Server may
host several virtual domains. Virtual domains can be conceptualized as sub directories on an
Internet server’s hard disk drive. The information that Internet clients wish to read would be
Files within the sub directory.

When an Internet client connects to an Internet server some software running on the Internet
server must respond to the Internet client’s request for information. The software that runs on an
Internet server and responds to an Internet client’s request for information is called Web Server
software.
An Internet Web server responds to an Internet client’s request for information by going to a
specific sub directory on its hard disk and forwarding a pre-determined file to the Internet client
for the first time. Further, the Web server forwards files to the client depending upon their
corresponding requests. Traditionally, this sub directory on the Internet server is ‘wwwroot’ and
the file automatically picked up and passed to the Internet client for the first time is traditionally
called ‘index.html’.

1.4.1 Ways to Communicate


Growth of mankind began with the advent of communication. We share information, when we
are communicating. Sharing of information can be done locally or remotely. Between
individuals, generally face to face communication is considered as local communication,
whereas communication which takes place over distance comes under remote communication.
The term telecommunication, which includes telephony, telegraphy, and television, means
communication at a distance (tele is Greek for "far").
Data is the information presented in whatever form is agreed upon by the parties creating and
using the data. The exchange of data between two devices via some form of transmission
medium (i.e. wire cable etc.) is known as data communications. To occur data communication,
the communicating devices must be part of a communication system which made up by
combining hardware (physical equipment) and software (programs). A data communication
system is effective if it has the following four fundamental characteristics.
 Delivery: Data must be delivered to the right destination by the system. The Data must be
received only by the intended device or user.
 Accuracy. The accurate data must be delivered by the system. Data which have been
changed during transmission and left uncorrected are unfeasible.
 Timeliness. The delivery of data must be on time by the system. If the data is not
delivered on time then that data is useless. In the case of video and audio, timely delivery
refers to delivering data in the same order as they are produced, and without significant
delay. This kind of delivery is known as real-time transmission.
 Jitter. The variation in the packet arrival time is referred to Jitter. It is the uneven delay in
the delivery of audio or video packets. For example, let us assume that video packets are
sent every 3D ms. If some of the packets arrive with 3D-ms delay and others with 4D-ms
delay, an uneven quality in the video is the result.
There are several ways to communicate over the internet. Some of them are as following.

1.4.1.1 Email
Electronic mail (E-mail) is one of the most famous internet services. In earlier days of the
internet, electronic mail sent short and consist only text messages. People could exchange
messages in a fast way. Now-a-days in e-mail, messages can consist text, audio, images and
video. It provides facility to send one message to one or more recipients. Users can compose,
read and send messages through E-mail.
1.4.1.2 Instant Messaging
To send real time messages from one user to another, Instant Messaging or IM is used. One user
types a message that is conveyed over a network and received by the other user. A specific
program (i.e. Yahoo Messenger or Windows Live Messenger etc.) is used for Instant messaging
between two or more people
1.4.1.4 Social Networking
Social networking is an important way of communication. Users can connect and communicate
to each other using it. Users can make new friends, find users of similar interest and reconnect
with old friends on Social networking websites or applications. Firstly, users need to create a
profile on these websites and customize the privacy policy according to their needs (i.e. who can
see his/her photos, send friend request or post on his/her timeline etc.). Facebook, Myspace,
Twitter, Instagram etc. are the popular social networking applications.
1.4.1.5 Forums
An online discussion site where people can do conversations in the form of posted messages is
known as an Internet Forum or Message Board. In Forums, they have a specific set of jargons
associated with them. For example: a single conversation is known as a “thread” or topic. A
discussion forum has a hierarchical or tree-like structure. In a forum, there can be a number of
sub forms, each of them may contain various topics. Any new discussion within a forum’s topic
is known as thread and as many people as want can reply. It depends on the Forum’s setting that
users can be anonymous or need to register with the forum and to post messages, they need to
log in. Most of the Forums allows users to read existing messages without log in.
1.4.1.6 Audio Conferencing
Audio conferencing is used to connect multiple called parties which are located at different
locations on a single audio conference call. Two or more people can be involved in an audio
conference call at the same time. Audio conference call can be conducted either through the
internet or telephone line. Devices (i.e. phones or computers) which allows sounds to be sent and
received are used for audio conferencing. Audio conferencing needs speakers and microphones
both. For listening purpose, only speakers are needed. But for speaking purpose microphones are
also required.
1.4.1.7 Video Conferencing
People are allowed to communicate with one another in real time interactive audio/video.
Videoconferencing is an example of real time interactive audio/video in which people are
allowed to communicate visually and orally.
In videoconferencing, system is full-motion, two-way, video/audio system which allows two or
more humans to communicate with each other which is located at different places.
Videoconferencing is usually used in business meetings, distance learning and web-based
courses. To make video conferencing success, participants should be able to see, hear and use
meeting tools anyway either they are in the same room or across the other side of the world. Live
broadcast of lectures and seminars are provided by colleges and universities to some of their
students who are not able to travel to class sites. In business meetings, videoconferencing is
useful for employee training, group work or to introduce a new product or service.

1.5 Internet Domains


Machines on the internet are uniquely identified using their corresponding IP addresses.
Similarly, the names assigned to the computers must be unique to avoid ambiguity. A
Namespace refers to the mapping between the names of the machine and their corresponding IP
address. Namespaces can be organized in two ways:
Flat Name Space: This indicates the direct mapping of the IP address to the complete name of
the machine. Names are simply a series of characters having no specific structure.
Hierarchical Name Space: In this name space, every name is composed of several parts. The first
component may refer to the nature of organization, second may indicate name of organization,
third may denote the department in the organization, and henceforth.
Hierarchical name space requires domain name space which is an inverted tree structure with
each level corresponding to a component of the name space. The complete tree shall have only
128 levels, where level 0 refers to the root. Figure 1.2 shows the structure of DNS.

Figure 1.2: Domain Name Space


A domain refers to a sub tree of the domain name space, as shown in Figure 1.3. The domain
name of the root of the sub tree will be the name of the domain. A domain can be further
subdivided into subdomains.
Figure 1.3: Domains
In the context of the Internet, the domain name space (tree) can be classified as:
i. Generic domains
ii. Country domains
iii. Inverse domains
Generic Domains: Generic domains identify the registered hosts as per their general
capabilities. Each node of such a tree refers to a domain which serves as the index for the domain
name space database. Figure 1.4 shows structure of Generic Domains

Figure 1.4: Generic Domains


Country Domains: Country Domains employ abbreviations of the country. The abbreviations
are limited to two characters, e.g. In for India. Further labels may refer to the specific
organization or other national designations. Consider the following country domain:
anza.cup.ca.us. This refers to De Anza College in Cupertino, California, United States.
Inverse Domains: The inverse domain maps the IP address of the machine to its corresponding
name. Consider, a client requesting some resource from a server. The server may have a list of
authenticated clients. However, the request received from the client has only the IP address of
the client. In such cases, it is required to resolve the IP address to the name of the client so that
the server can verify it with the list of authenticated clients it has.

1.6 Establishing Connectivity on Internet


The TCP/IP is used as a communication protocol between client and server over the internet.
TCP/IP which is termed as Transmission Control Protocol/ Internet Protocol. It is a
connectionless protocol. This depicts that the TCP/IP is an independent protocol which is
completely working independent of its physical media. VSat, Ethernet, Fiber Optics, VHF/UHF
radio frequencies and the Infrared comprises of the network and can be a heterogeneous mix of
above networking technologies, but TCP/IP behaves transparently to all. The data is broken
down into the datagram which guarantee the correct destination. Here we present some of the
networking technologis:

1.6.1 Telephone Line


Since most new computers are equipped with analog modems, the most common method of
connecting to the internet is represented by them for the first time and most computer users are
familiar to them. The analog data transmitted over the telephone lines is converted into digital by
the modem which is known as modulator/demodulator, the process or reading is called
demodulation while the process of transmitting is called modulation. As we are using analog
phone lines so they are known as analog model as the name depicts use of analog signal.
The offered speed was 14.4 kilobits per second (Kbps), 28.8 Kbps and 33.6 Kbps, and as per
latest information it is 56 Kbps, which is build up in almost every machine. These low-speed
modems are regarded as inconvenient by individuals and small businesses who are surfing the
web with increasing frequency. The importance part to know about the speed is-Fast modem
itself does not allow to connect at a fast speed. For example, 56kbps speed is achieved by 56kbps
modem. Connection speed varies with amount of traffic present on the line which is caused by
number of users in the network.

1.6.2 Leased Line


The telephone company gives the leased line on rent to the customer which is called direct
connection for accessing the internet.
Speed: T-carrier Level (T1) line is a common option, enabling the transmission of data at a speed
of 1.544Mbps. T-1 line has 24 channels each consisting of 64kbps support. Voice or data traffic
can flow through the channel. Most telephone companies allow only fractional T-1 access, they
can consume only a fraction of the channel this is another type of leased line. For T-3 672
individual channels consisting of 64 kbps speed is made up which is also another type of leased
line.

1.6.3 ISDN
A standard telephone line which works over ISDN requires fully digital signal over copper wire.
So, digital to analog conversion is not required this is in the manner of the working of analog
channel. Two lines called B-lines are offered by most of the telephone companies. It offers the
user the flexibility to use different lines for voice and data, or both lines can be used for higher
data rates of 128kbps. B-ISDN offers transmission rates of 1.5mbps. It requires fibre optics
cable.
Speed: At the time of introduction approximately a decade ago, very significant speed advantage
was offered by ISDN over regular modems, which were further limited to 14.4 Kbps or slower.
At earlier time most of these connections did not exist. It was used by people who required faster
internet access and could not use the leased line. The connection range was approximately from
64kbps to 128kbps. But the speed of ISDN does not come close to that of options such as cable
of xDSL.

1.6.4 VSAT
VSAT (Very Small Aperture Terminal) is a satellite communications system that serves home
and business users. A VSAT user requires a box that interfaces between outside antenna with a
transceiver and the user's computer. A signal is send or received by the transmitter from the
satellite. The earth station is used to send and receive the satellite. Each end user is
interconnected with the hub station via the satellite in a star topology. For one end user to
communicate with another, each transmission has to first go to the hub station which retransmits
it via the satellite to the other end user's VSAT. VSAT handles data, voice, and video signals.
VSAT is signed up by user both by home users who uses a large service such as DirectPC and by
operating a leased line of their own by private companies such as VSAT systems. A number of
advantages over the terrestrial system is provided For private applications, companies can have
total control of their own communication system without dependence on other companies.
Business and home users also get higher speed reception than if using ordinary telephone service
or ISDN.

1.6.5 RF link
A radio frequency (RF) signal refers to a wireless electromagnetic signal used as a form of
communication, if one is discussing wireless electronics. Radio waves are a form of
electromagnetic radiation with identified radio frequencies that range from 3kHz to 300 GHz.
Frequency refers to the rate of oscillation (of the radio waves.) RF propagation occurs at the
speed of light and does not need a medium like air in order to travel. RF waves occur naturally
from sun flares, lightning, and from stars in space that radiate RF waves as they age. Humankind
communicates with artificially created radio waves that oscillate at various chosen frequencies.
RF communication is used in many industries including television broadcasting, radar systems,
computer and mobile platform networks, remote control, remote metering/monitoring, and many
more.
Wireless RF can be a fantastic option for providing high-speed links (up to 100Mb) between
offices in a multisite organization. It is also a very effective solution in providing broadband
speeds to remote locations or where cabling isn’t easy or available.
This technology will permit linking of company sites together for faster server/email/file access,
or even CCTV access. Wireless RF can also be used for a company’s primary internet
connection.
The benefits of this system are obvious to those customers who suffer because of their remote
location or that have a demand for significant traffic between satellite offices.

1.7 Client IP Address


An IP address which is called the Internet Protocol address is assigned as a numerical label to
every device that are on a network, for communication it uses the internet protocol. The two
principle functions served by IP address are i) network or host interface identification ii) location
addressing.

1.7.1 Client IP Addresses Assignment


A permanent IP address is not necessarily required by the computers (Internet Clients) that only
read offered information. A client requires a unique IP address when it log on to the internet. The
internet server is addressed by the IP, for an accurate reply. The client is connected to the
internet via ISP (Internet Server provider), then a temporary assignment of unique IP address is
made to the client device. VSNL (Videsh Sanchar Nigam Limited) has been a major provider in
India for a very long time. When a client starts the internet connection via VSNL, a dynamic IP
is allocated to the client and then the client successfully login.

1.7.2 ISP’s Task of Assigning IP Addresses


ISP’s purchase a block of unique IP addresses from internationally recognized networking
bodies. Thus, whenever a client logs into the Internet via an ISP’s Server, one of these unique IP
addresses is temporarily assigned to the computer, which logs in. The maximum number of
computers that can log into an ISP Server and access the Internet is therefore limited to the block
of unique IP addresses purchased by that ISP from the international networking body.
1.7.3 Getting a Temporary IP Address
For a client being a windows machine, for getting an IP address dynamically from DHNS server
of the ISP which is VSNL IP as discussed above. A dial-up line and a modem is used by the
client for getting logged in. When a client has logged in, the client machine is allocated an IP
address from the block of assigned IP addresses, for a logged in device. Once we log on to the
internet a unique IP address is assigned, other computers on any network can easily
communicate by knowing the client IP address i.e. the visibility of all the clients are now open to
one another, by having a unique IP through the server.

1.7.4 Resolving Domain Names


When a browser software is used to communicate with any IP address, the Server’s domain name
is used to send out broadcast through the client. This request is first intercepted by the ISP. The
request is then routed to a root server of InterNIC. The domain name is usually mapped to root
server in the InterNIC host file. Finally, the ISP server receives this host file. This IP address is
then passed back to the client’s browser. A request is broadcasted from the client’s browser to
connect using its IP address directly to the Internet Server. When the internet server receives this
request, it sets up a link between the client and the server. The client is connected to the virtual
domain by the software used for communication between the client and the server.
The first HTML page is delivered to the client once a client is connected to the appropriate
domain which is frequently Index.html or Index.htm and we can begin the browsing of the
specific domain. For instance, if any other client is connected via same IP through the same ISP
a cache of IP address will be maintained with ISP. The internet server unique IP address is
already maintained by the ISP. Hence the call is routed to appropriate internet server.

1.7.5 Internet Address Structure


For the client browser the keyed structure of an Internet Server is displayed as:
http://www.microsoft.com where http protocol is used for communication, www depicts World
Wide Web, Microsoft is used as the registered domain name of the internet server and com is
used for the commercial services provided to the client. For speeding up the access, 127.57.13.1
can be directly used as IP instead of miscrosoft.com, which is the domain name.

1.8 TCP/IP and its Services


The entire internet protocol suite -- a set of rules and procedures -- is commonly referred to as
TCP/IP, though others are included in the suite. TCP/IP specifies how data is exchanged over the
internet by providing end-to-end communications that identify how it should be broken into
packets, addressed, transmitted, routed and received at the destination. TCP/IP requires little
central management, and it is designed to make networks reliable, with the ability to recover
automatically from the failure of any device on the network.
The two main protocols in the internet protocol suite serve specific functions. TCP defines how
applications can create channels of communication across a network. It also manages how a
message is assembled into smaller packets before they are then transmitted over the internet and
reassembled in the right order at the destination address.
IP defines how to address and route each packet to make sure it reaches the right destination.
Each gateway computer on the network checks this IP address to determine where to forward the
message

1.8.1 How TCP/IP works


TCP/IP uses the client/server model of communication in which a user machine (a client) is
provided a service (like sending a webpage) by another computer (a server) in the network.
Collectively, the TCP/IP suite of protocols is classified as stateful, which means each client
request is considered new because it is irrelevant to previous requests. Being stateless frees up
network paths so they can be used continuously.
The transport layer itself, however, is stateful. It transmits a single message, and its connection
remains in place until all the packets in a message have been received and reassembled at the
destination. Figure 1.5 represents the TCP/IP Protocol Suite.

1.8.2 TCP/IP model

Figure 1.5: TCP/IP Protocol Suite


1.8.2.1 The Network Interface layer
The Network Interface layer (also called the Network Access layer) is responsible for placing
TCP/IP packets on the network medium and receiving TCP/IP packets off the network medium.
TCP/IP was designed to be independent of the network access method, frame format, and
medium. In this way, TCP/IP can be used to connect different network types. These include LAN
technologies such as Ethernet and Token Ring and WAN technologies such as X.25 and Frame
Relay. Independence from any specific network technology gives TCP/IP the ability to be
adapted to new technologies such as Asynchronous Transfer Mode (ATM).
The Network Interface layer encompasses the Data Link and Physical layers of the OSI model.
Note that the Internet layer does not take advantage of sequencing and acknowledgment services
that might be present in the Data-Link layer. An unreliable Network Interface layer is assumed,
and reliable communications through session establishment and the sequencing and
acknowledgment of packets is the responsibility of the Transport layer.
1.8.2.2 Network Layer
The network layer is responsible for addressing, packaging, and routing functions. The core
protocols of the Internet layer are IP, IGMP, ICMP and ARP. The Internet Protocol (IP) is a
routable protocol responsible for IP addressing, routing, and the fragmentation and reassembly of
packets. The Address Resolution Protocol (ARP) is responsible for the resolution of the Internet
layer address to the Network Interface layer address such as a hardware address.
The Internet Control Message Protocol (ICMP) is responsible for providing diagnostic functions
and reporting errors due to the unsuccessful delivery of IP packets. The Internet Group
Management Protocol (IGMP) is responsible for the management of IP multicast groups. The
Internet layer is analogous to the Network layer of the OSI model.
1.8.2.3 Transport Layer
The Transport layer (also known as the Host-to-Host Transport layer) is responsible for
providing the Application layer with session and datagram communication services. The core
protocols of the Transport layer are Transmission Control Protocol (TCP) and the User Datagram
Protocol (UDP). TCP provides a one-to-one, connection-oriented, reliable communications
service. TCP is responsible for the establishment of a TCP connection, the sequencing and
acknowledgment of packets sent, and the recovery of packets lost during transmission. UDP
provides a one-to-one or one-to-many, connectionless, unreliable communications service. UDP
is used when the amount of data to be transferred is small (such as the data that would fit into a
single packet), when the overhead of establishing a TCP connection is not desired or when the
applications or upper layer protocols provide reliable delivery.
The Transport layer encompasses the responsibilities of the OSI Transport layer and some of the
responsibilities of the OSI Session layer.
1.8.2.4 Application Layer

The TCP/IP model does not have session or presentation layers. No need for them was
perceived, so they were not included. Experience with the OSI model has proven this view
correct: they are of little use to most applications. On top of the transport layer is the application
layer. It contains all the higher-level protocols. The early ones included virtual terminal
(TELNET), file transfer (FTP), and electronic mail (SMTP). The virtual terminal protocol allows
a user on one machine to log onto a distant machine and work there. The file transfer protocol
provides a way to move data efficiently from one machine to another. Electronic mail was
originally just a kind of file transfer, but later a specialized protocol (SMTP) was developed for
it. Many other protocols have been added to these over the years that includes Domain Name
System (DNS) for mapping host names onto their network addresses, NNTP, the protocol for
moving USENET news articles around, and HTTP, the protocol for fetching pages on the World
Wide Web, and many others.
1.8.3 Services of TCP/IP
TCP/IP is a hierarchical protocol made up of interactive modules, each of which provides a
specific functionality. The modules are not necessarily interdependent. The OSI model specifies
which functions belong to each of its layers. The layers of the TCP/IP protocol suite contain
relatively independent protocols that can be mixed and matched depending on the needs of the
system. The term hierarchical means that each upper-level protocol is supported by one or more
lower-level protocols.
At the transport layer, TCP/IP defines three protocols: Transmission Control Protocol (TCP),
User Datagram Protocol (UDP), and Stream Control Transmission Protocol (SCTP). At the
network layer, the main protocol defined by TCP/IP is the Internetworking Protocol (IP); there
are also some other protocols that support data movement in this layer. The application layer in
TCP/IP is equivalent to the combined session, presentation, and application layers in the OSI
model. Many protocols are defined at this layer, some which are described below.
1.8.3.1 Simple Network Management Protocol (SNMP)
It is an Internet Standard protocol for collecting and organizing information about managed
devices on IP networks and for modifying that information to change device behavior. Devices
that typically support SNMP include cable modems, routers, switches, servers, workstations,
printers, and more. The main goal of SNMP is network monitoring for network management
tasks. A management information base (MIB) is maintained that contains entries in the form of
variables that describe the system status and configuration. Managing applications can query and
sometimes even manipulate these variables. It can monitor devices manufactured by different
companies working on different physical networks. It specifies the format of message that is
exchanged between manager and agents. SNMP frees management tasks from the physical
characteristics of devices from the network technologies they use. An important task of SNMP is
monitoring or managing a group of agents that is devices through an administrative device also
known as managers. Each managed system executes a software component called
an agent which reports information via SNMP to the manager. A network management on the
Internet consists of three key components SMI (Structure of Management Information), MIB
(Management Information Base) and SNMP. A typical example of SNMP is shown in Figure
1.6:

Figure 1.6 Working of SNMP


A managed device is a network node that implements an SNMP interface that allows
unidirectional (read-only) or bidirectional (read and write) access to node-specific information.
Managed devices exchange node-specific information with the NMSs. The types of devices that
can be called as managed devices or network elements are switches, routers, cable modems,
hubs, bridges, IP video cameras, access servers, computer hosts etc. An agent is a network-
management software module that resides on a managed device. An agent has local knowledge
of management information and translates that information to or from an SNMP-specific form.
A network management station executes applications that monitor and control managed devices.
NMSs provide the bulk of the processing and memory resources required for network
management. One or more NMSs may exist on any managed network.
1.8.3.2 File Transfer Protocol (FTP)
It is the standard network protocol used for the transfer of computer files between a client and
server on a computer network. FTP uses two connections for a pair of client-server machine; one
is completely dedicated for data flow while the other is dedicated for control information. FTP
users may authenticate themselves with a clear-text sign-in protocol, normally in the form of a
username and password. Anonymous connection is also possible with suitable server
configuration. For secure transmission that protects the username and password, and encrypts the
content, FTP is often secured with SSL/TLS. The first FTP client applications were command-
line programs developed before operating systems had graphical user interfaces, and are still
shipped with most Windows, Unix, and Linux operating systems. Many FTP clients and
automation utilities have been developed for desktops, servers, mobile devices, and hardware,
and FTP has been incorporated into productivity applications, such as web page editors.
1.8.3.3 Domain Name System (DNS)
The essence of this protocol is in linking URLs with IP address and vise-versa. It is
a hierarchical decentralized naming system for computers, services, or other resources connected
to the Internet or a private network. It associates various information with domain
names assigned to each of the participating entities. The major responsibility of this protocol lies
in identifying the unique IP address for a URL that users or humans can remember easily. IP
addresses are needed for locating and identifying computer services and devices with the
underlying network protocols. By providing a worldwide, distributed directory service, the
Domain Name System is an essential component of the functionality on the Internet that has
been in use since 1985. An authoritative name server is designated for each domain. DNS
outsources the responsibility of assigning domain names and mapping these names to
corresponding Internet resources to the authoritative servers. Network administrators may
delegate authority over sub-domains of their allocated name space to other name servers. This
distribution of responsibilities facilitates distributed and fault tolerant service and avoids a single
large central database. The Domain Name System also specifies the technical functionality of
the database service that is at its core. It defines the DNS protocol, a detailed specification of the
data structures and data communication exchanges used in the DNS, as part of the Internet
Protocol Suite. Historically, other directory services preceding DNS were not scalable to large or
global directories as they were originally based on text files, prominently the hosts file.

1.8.4 Advantages of TCP/IP


TCP/IP is compatible with all operating systems, so it can communicate with any other system.
The internet protocol suite is also compatible with all types of computer hardware and networks.
Hence, this is the only protocol used for communication over Internet.
1.8.4.1 Standardization
Although computers are capable of exchanging data with each other using several data transfer
methods, communication by its very definition requires the transferred information to be
understood on the receiving end. A communication protocol is like a language; it enables
computers to communicate with each other so that the receiving computer understands the data
sent to it. TCP/IP standardizes this communication process by offering one universal protocol for
all the computers over the Internet to use in their communication with each other.
1.8.4.2 Interoperability
Just as in human communication, computers may use several different languages to
communicate with each other. Some protocols may be more suitable for use in certain private
networks than TCP/IP. However, TCP/IP enables such networks to be connected to the Internet.
Furthermore, it lets computers and devices with different hardware architectures and running
different operating systems communicate with each other. This means a computer running
Windows can connect to a web server running Linux to browse the website hosted there. It is
quite similar to the use of English as an international language today.

1.8.4.3 Addressing
TCP/IP assigns each computer on the network a unique address called its IP address. Thus, every
computer on the network is uniquely identifiable and information could be sent to it by simply
addressing its IP address. The present implementation of IP addressing is known as IPv4, while a
newer implementation supporting a much larger number of unique addresses called IPv6 is being
developed to replace IPv4.

1.8.4.4 Connection
Communication with TCP/IP starts with a connection being established between the two
computers. This is achieved in a systematic manner, called the three-way TCP handshake. The
computer initiating the communication sends a connection request packet to the other computer.
If the computer is the one with the correct IP address, it sends a packet back. If the first computer
receives that packet, it sends another one to the second computer, the reception of which by the
latter establishes a connection. The information is then exchanged using this established
connection, reducing the risk of the data being compromised.

1.9 Web Servers


Web servers are dedicated computers that uses HTTP to serve Web pages. Web server has an IP
address and a domain name. As by entering URL http://www.webopedia.com/index.html in
browser, it requests to the Web server having domain name, “webopedia.com”. The server in
response, fetches the page named index.html to the browser.
Any computer can act as web server after installing server software on it. There are many Web
server softwares, like public domain software and commercial packages.
1.9.1 Web Server Working
Web server responds to the client's request in either of the two ways:
 Attaching the file with the requested URL and sending it to the client.
 Response generation by invoking script and communicating with database
The figure below explains the working of a Web server.

Figure 1.7 Working of Web Server

1.9.2 Web Server Architecture


Web Server Architecture follows two approaches:
1. Concurrent Approach - It can handle multiple client's requests at the same time. This can be
achieved by following methods:
 Multi-process – The incoming request is distributed among multiple single-threaded child
processes generated from a single process called parent process.
 Multi-threaded - Unlike Multi-process, it creates multiple threaded process.
 Hybrid method - Multiple processes are created and multiple threads are initiated by each
process. Each thread handles one connection. It results in less load on system resources.
Leading Web servers include Apache, nginx from NGNIX, Microsoft's Internet Information
Server (IIS), IBM's family of Domino servers, Novell's NetWare server, Google Web Server
(GWS).
2. Single-Process-Event-Driven Approach - It uses a single event-driven server process to
perform concurrent processing of multiple HTTP requests. It maps a single thread to multiple
connections. The thread handles all events occurring from I/O operations of these connections
and requests. New events are queued and the thread executes loop-dequeuing events from the
queue, process the event, then waits for new events to be pushed.
1.10 Web Client
A web client is a program capable of communicating with Web servers, requesting and receiving
information from them, and processing it for display or other uses. Web browser is a kind of
Web client. The browser at the client computer requests the Web server and the Web server
responds the results on the client's computer or other Internet-enabled device that supports a
browser. A web page can be requested by just entering a URL into address bar.
Web browser supports text, video, audio, animation etc. files. It is browser's responsibility to
interpret commands contained in the web page.
Earlier the web browsers only supported texts but now graphical or voice-based web browsers
are also available. The most common web browser available today are:

Browser Vendor

Internet Explorer Microsoft

Google Chrome Google

Mozilla Firefox Mozilla

Netscape Communications
Netscape Navigator
Corp.

Opera Opera Software

Safari Apple

Table 1.2 Common web browsers available

1.10.1 Web Browser Architecture


There are a number of web browsers available in the market. The capability and structure of the
browser varies depending upon implementation. The most basic components are listed below:
 Controller/Dispatcher – The working is similar to that of control unit in CPU. It takes
input from the keyboard or mouse, translate it and make other services to work based on
input it receives.
 Interpreter – After collecting the information from the controller, it executes the
instruction line by line. Some interpreters are mandatory (HTML) while some are
optional (Java).

 Client Programs – It describes the specific protocols have been designed to access a
particular service.
Figure 1.8 Architecture of a web browser

1.11 Domain Registration


The Internet Corporation for Assigned Names and Numbers (ICANN) is the non-profit
organization that is responsible for the assignment of both IP addresses and domain names. It
also procures other tasks like managing root server and TLD name system management. ICANN
has contractual agreements with both registries and registrars that provide the foundation for the
WHOIS system.
Domain registration is the process of registering a domain name, which identifies one or more IP
addresses with a name that is easier to remember and use in URLs to identify particular Web
pages. The person or organization who registers the domain name is called as Domain name
registrant. The process of registration initializes with applying online to domain registrar or their
resellers. The domain name registrant is bound by the terms and conditions of the registrar with
which it registers its domain name, for instance adhering to a certain code of conduct or
indemnifying the registrar and registry against any legal or civil action taken as a result of use of
the domain name. Some of the responsibilities of domain name registrants that are included in
the terms and conditions are submission of accurate data, payment of registration fees and timely
update of the submitted data.
For domain name to be reachable on the Internet, domain name registrants additionally need to
have their domain names listed on name servers. In case the registrar does not offer this service
or if the domain name registrant has not opted for the same, he/she has to host his/her own name
server.
In some cases, a person or organization who does not wish to have their information listed in
WHOIS may contract with a proxy service provider to register domain names on their behalf. In
this case, the service provider is the domain name registrant, not the end customer.
ICANN accredits certain organizations that are called as Registrars. These organizations are also
certified by the registries to sell domain names. They are bound by the Registrar Accreditation
Agreement (RAA) with ICANN, and by their agreements with the registries. The responsibilities
for registrar that are imposed by the RAA include:
 maintaining WHOIS data
 submitting data to registries
 facilitating public WHOIS queries
 ensuring domain name registrants details are escrowed
 complying with RAA conditions relating to the conclusion of the domain name
registration period
Resellers are the organizations that are affiliated or under contract with registrars. Along with
registration they offer other services like web hosting, email mailboxes etc. Resellers are not
accredited by ICANN, but are bound by their agreements with the registrar(s) whose services
they sell. However, the registrar for whom they are re-selling will still be the sponsor for the
domain name registration and accountable for the domain names sold by the reseller.
While registrars are contracted to conduct the day-to-day business of selling domain name
registrations, registries are responsible for maintaining the registry for each TLD. The
responsibilities of the registries include accepting registration requests (whether from registrars
or directly from domain name registrants), maintaining a database of the necessary domain name
registration data and providing name servers to publish the zone file data (i.e. information about
the location of a domain name) throughout the Internet. A detailed figure representing the
registration process is shown below.

Figure 1.9: Domain Registration Process


1.12 Summary
Internet can be viewed as global system of interconnected networks used for sharing resources
between computing systems. Internet Standard ensures that hardware and software produced by
different vendors can work together. Having a standard makes it much easier to develop software
and hardware that link different networks because software and hardware can be developed one
layer at a time. The most fundamental of the Internet Standards are the ones defining the Internet
Protocol. For transmitting digital data over analog telephone lines modems are used. With the
evolution of technology, certain different types of modems such as analog, digital cable (ADSL)
and ISDN have been developed. Computers connected to the internet are identified using unique
identifiers known as IP address. These addresses are mapped to the names of the computers by
the DNS. The name-address mapping is required whenever some data needs to be transmitted
between one computer to another. Many technologies exist for connecting to the internet, such as
telephone lines, VSAT, RF, etc. The organizations providing the internet services to the users are
known as Internet Service Provider (ISP). Internet has a wide range of applications that can be
utilized by the users such as, emails, video conferencing, etc.

1.13 Questions for Exercise


1. What is Internet? What do you understand by Internet Standards?
2. What are the ways to communicate on Internet?
3. What is TCP/IP? Differentiate Between TCP/IP and OSI Reference model?
4. Explain the TCP/IP model layers and its services?
5. Explain Internet Domain? What is Internet Server Identities?
6. What is Web Server and Web client?
7. What is IP Address? Define classes of IP Address.
8. What is Domain Registration? Explain the steps to register a Domain.

1.14 Suggested Readings


 Behrouz A. Forouzan. 2012. Data Communications and Networking, Fifth Edition. New
York: the McGraw-Hill Companies Inc.
 William Stallings. 2007. Data and Computer Communications Eighth Edition. New
Jersey: Person Education,Inc.
 Douglas E. Comer.2003. The Internet Book. Singapore: Pearson Education Pte. Ltd.
UNIT- 3: Introduction to HTML
UNIT STRUCTURE
2.0 Objective
2.1 HTML
2.2 HTML tags
2.3 Commonly used HTML commands
2.4 Title and footers
2.5 Text formatting
2.6 Text Style
2.7 Lists
2.8 Adding Graphics to HTML documents
2.9 Tables
2.10 Linking Documents
2.11 Frames
2.12 Summary
2.13 Questions for Exercise
2.14 Suggested Readings

2.0 Objective
HTML, an acronym for Hyper Text Markup Language, specifies how the structure of a webpage
will be with the help of various markups. The following unit explains the core concepts of
HTML such as its structure, elements, attributes and core events. It also sheds light on block-
level elements and text-level elements. With the help of this unit, the reader will be able to
understand the basic elements used in HTML and their usage in the formatting of a webpage.

2.1 HTML
HTML, an acronym for Hyper Text Markup Language, specifies how the structure of a webpage
will be with the help of various markups. It is a structured markup language that is used to create
Web pages. Markup languages like HTML bundle together codes which are elements that are
used to represent the structure and format of a document. A user agent, usually a Web browser
which renders (delivers) the document, interprets the meaning of these codes to decipher
(making it into simpler human readable text) how to structure or display a document. The HTML
elements are made up of alphanumeric tokens surrounded by angle brackets, for example, <B>,
<HTML>, <IMG> and <HR> .
Almost all elements possess a pair of tags i.e. a start tag and an end tag. The start tag is a
mnemonic symbol for the element enclosed in ‘<’ ’>’, also known as angle brackets, for
instance, the symbol associated with bolding text is B and the start tag for this purpose is <B>.
An end tag is the same as that for a start tag, but with an exception that there exists a forward
slash preceding the text symbol of start tag: </B>. The instruction applied by an element
modifies whatever content is present between the starting and ending tags:
This is an example of a simple HTML document.
Example:

<! DOCTYPE html>


<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>It is the First Heading</h1>
<p>It is the first paragraph.</p>
</body>
</html>
Output:

2.2 HTML tags


Since HTML is a markup language, therefore, it uses certain tags for formatting the content. The
tags are used with angle braces as in <Tag Name>. Leaving few tags, most tags require to be
supplemented with closing tags</Tag Name>. As for example, the closing tag of
<html> is </html> and the closing tag of <body> is </body>.
HTML document uses the following tags provided in Table 2.1.
Tags Description

<! DOCTYPE…> It represents the document type and HTML


version.
<html> The HTML document itself begins with
<html> and ends with </html>
<head> This tag defines the header of document and it
can keep other HTML tags like <title>
<title> The <title> tag is used inside the <head> tag to
represent document title
<body> It represents the document’s body which keeps
other HTML tags like <h1>
<h1> It defines the heading

<p> This tag represents a paragraph

Table 2.1 HTML Tags


2.2.1 The <!DOCTYPE> Declaration
The <!DOCTYPE> declaration tag is implemented to detect the HTML version used in the
document. The contemporary HTML version is 5 which uses the following declaration:
<!DOCTYPE html>
There are several declaration types which are used in HTML documents on the basis of HTML
version being used. More details will be observed on this during elaboration of <!DOCTYPE...>
tag and the remaining HTML tags.

2.2.2 Heading Tags


HTML documents begin using a heading. Different sizes can be applied for using headings.
HTML features mainly six heading levels using the elements <h1>, <h2>, <h3>, <h3>, <h5>,
and <h6>. The web browser inserts one line before and after a heading for fulfilling the purpose
of displaying it. Here is an illustrated example.
Example:
<!DOCTYPE html>
<html>
<head>
<title> Example of a Heading</title>
</head>
<body>
<h1> Example of heading 1</h1>
<h2> Example of heading 2</h2>
<h3> Example of heading 3</h3>
<h4> Example of heading 4</h4>
<h5> Example of heading 5</h5>
<h6> Example of heading 6</h6>
</body>
</html>
Output:

Sample of Heading 1
Sample of Heading 2
Sample of Heading 3

Sample of Heading 4
Sample of Heading 5

Sample of Heading 6

2.3 Commonly used HTML Commands


2.3.1 HEADERS
In HTML, up to six levels of headers are used in any documents, h1 to h6. Header 1 (h1) is the
largest header and they get successively smaller through header 6 (h6). Below is an example of
<h1> header and how it usually appears in a relation. For rest of the headers we can refer to
section 2.2.2 of this book. Here is an example of a <h1> tag.

Example:

<h1>Example of a header 1 tag</h1>

Output:

EXAMPLE OF A HEADER 1 TAG

2.3.2 PARAGRAPHS
The <p> tag provides a means to structure our text into different paragraphs. Each paragraph
should write in between an opening <p> and a closing </p> tag as shown below in the example.

Example:

<p> it breaks the current line with a trailing blank line

<br>it breaks the current line with no trailing blank line

For our and others convenience, it is better to put few blank lines between paragraphs to edit in
future or on demand.

2.3.3 PREFORMATTED TEXT


The preformatted text tag <pre> used to display the same text in our document as it is written in
HTML script. The font-width, their spaces, lines and tabs of our source document remain as is it.
In simple words, the browser shows our text as we typed it in. Through monospace font, the text
is rendered where the same amount of space is occupied by all characters. Visually, preformatted
text looks like a courier font. This is an example of preformatted tag.

Example:

<pre>this is a preformatted text tag example</pre>

Output:

this is a preformatted text tag example

2.3.4 BOLDFACE, UNDERLINE AND ITALICS


We can use bold, italic and underline <b>, <i> and <u> tags respectively in HTML editor to
highlight the text in a HTML document. The text in-between <b> </b> tags text will be bold and
similarly we can apply other two italic and underline. The HTML links do not require extra tag
because these are already underlined. The potential for confusion and the archaic nature of
underlining in general make it a poor marker for emphasis.
When using these tags, we usually cannot (and probably should not) have text that is both
boldface and italics; the last tag encountered is usually the tag that is displayed. For example, if
we had a boldface tag followed immediately by an italic tag, the tagged word would appear in
italics. This is an example.

Example:

<b>boldface</b>
<u> underline</u>
<i>italic</i>

Output:

boldface
underline

italic

2.3.5 LISTS
In HTML, we can give number, unnumbered and lists to the different text using the simple tags.
We can also use nested lists with a list. HTML editor automatically takes the space between the
bullet or list number in a text, we do not need to mention it. Neither (as yet) do we have control
over what type of bullet will be used as each browser is different.

Unnumbered lists:
<ul> tag is use to unnumbered any list followed by the actual list items, which are marked with
the <li> tag. The list is ended with the ending tag </ul>.

For example, here is an unnumbered list with three items:

Example disc bullets:

<!DOCTYPE html>
<html>
<body>
<h2>Disc bullet with Unordered list </h2>
<ul style="list-style-type:disc">
<li>Ram</li>
<li>Shyam</li>
<li>Mahesh</li>
</ul>
</body>
</html>
Output disc:

 Ram
 Shyam
 Mahesh

This is an example of a circle bullet.

Example circle bullets:

<!DOCTYPE html>
<html>
<body>
<h2>Circle bullets with Unordered list </h2>
<ul style="list-style-type:circle">
<li>Ram</li>
<li>Shyam</li>
<li>Mahesh</li>
</ul>
</body>
</html>

Output:

o Ram
o Shyam
o Mahesh

This is an example of a square bullet.

Example square bullet:

<!DOCTYPE html>
<html>
<body>
<h2> Square Bullets with Unordered list </h2>
<ul style="list-style-type:square">
<li>Ram</li>
<li>Shyam</li>
<li>Mahesh</li>
</ul>
</body>
</html>
Output:

 Ram
 Shyam
 Mahesh

Numbered lists
Similar example given here using a numbered list format:

Example Numbers:

<!DOCTYPE html>
<html>
<body>
<h2>Numbers are used for Ordered List</h2>
<ol type="1">
<li>Ram</li>
<li>Shyam</li>
<li>Mahesh</li>
</ol>
</body>
</html>

Output:

1. Ram
2. Shyam
3. Mahesh

This is an example of an uppercase letter use in list.

Example Uppercase Letters:

<!DOCTYPE html>
<html>
<body>
<h2>Letters are used for Ordered List </h2>
<ol type="A">
<li>Ram</li>
<li>Shyam</li>
<li>Mahesh</li>
</ol>
</body>
</html>

Output:
A. Ram
B. Shyam
C. Mahesh

This is an example of a lowercase letter use in list.

Example Lowercase Letter:

<!DOCTYPE html>
<html>
<body>
<h2> Lowercase Letters are used for Ordered List </h2>
<ol type="a">
<li>Ram</li>
<li>Shyam</li>
<li>Mahesh</li>
</ol>
</body>
</html>

Output:

a. Ram
b. Shyam
c. Mahesh
This is an example of roman letters.
Example Roman letters:
<!DOCTYPE html>
<html>
<body>
<h2> Roman Numbers are used for Ordered List </h2>
<ol type="I">
<li>Ram</li>
<li>Shyam</li>
<li>Mahesh</li>
</ol>
</body>
</html>

Output:

I. Ram
II. Shyam
III. Mahesh
2.3.6 BLOCKQUOTE
For a long quotation in the text, we can use a < blockquote > tag and the text enclosed within this
tag indicates an extended quotation. Blockquote texts are generally rendered by the browser as
indented text. It looks like this:

<blockquote>...</blockquote>

2.3.7 HORIZONTAL LINE


We can insert a horizontal rule tag <hr> to separate a paragraph into different sections. A
horizontal rule line is displayed as shown below:

This is an example of a horizontal line

This is an example of a horizontal line

2.4 Title and footers


Title definition and Usage

The <title> is an important tag which required to shown the title of the HTML documents and it
only contains text and other tags containing in the title are ignored. The title is displayed in the
browser’s toolbar. It also shows the favorite pages title which we added during browsing and in
search-engine results title.

This is an illustrative example of title tag.

Example:
<!DOCTYPE html>
<html>
<head>
<title> First HTML script for web page </title>
</head>
<body>
First HTML script for web page
</body>
</html>
Output:
Footer definition and Usage

The <footer> tag in HTML represents a footer for a document or section. A <footer> element
generally contains information about its author, copyright data or links to other related
documents. You can have several <footer> elements in one document.

This is an example of a footer.

Example:

<!DOCTYPE html>
<html>
<body>
<footer>
<p>Posted by: xyz</p>
<p>Contact information: <a href="mailto:xyz@yahoo.com">xyz@yahoo.com</a>.</p>
</footer>
<p><strong>Note:</strong> The footer tag is supported only from Internet Explorer 9 and later
versions.</p>
</body>
</html>

Output:

2.5 Text Formatting


The text formatting tags are used to change the appearance of some text so that it looks different
from normal text in web pages. Several formatting tags are consists in HTML to format the text,
like <i>, <em> etc.
The following HTML tags can be used to display special types of text:
 <ins> - Inserted text
 <del> - Deleted text
 <i> - Italic text
 <b> - Bold text
 <small> - Small text
 <em> - Emphasized text
 <strong> - Important text
 <mark> - Marked text
 <sub> - Subscript text
 <sup> - Superscript text

2.5.1 HTML <b> and <strong> Elements


The HTML <b> tag displays bold text, without any extra importance.

Example:

<!DOCTYPE html>
<html>
<body>
<p> Example of a simple text.</p>
<p><b> Example of a bold text.</b></p>
</body>
</html>

Output:

Example of a simple text

Example of a bold text.

2.5.2 HTML <i> and <em> Elements


The HTML <i> tag represents italic text, without any extra importance.

<!DOCTYPE html>
<html>
<body>
<p>Example of a simple text.</p>
<p><i>Example of a italic text.</i></p>
</body>
</html>

Output:

Example of a simple text.

Example of italic text.

2.5.3 HTML <small> Element

The HTML <small> tag defines smaller text:

Example:
<!DOCTYPE html>
<html>
<body>
<h2>HTML <small>Small</small> Formatting</h2>
</body>
</html>

Output:

2.5.4 HTML <mark> Element


The HTML <mark> tag defines marked or highlighted text:

Example:

<!DOCTYPE html>
<html>
<body>
<h2>HTML <mark>Marked</mark> Formatting</h2>
</body>
</html>

Output:

The HTML <del> tag used to highlight the deleted (removed) text.

Example:
<!DOCTYPE html>
<html>
<body>
<p>The del tag defines deleted (removed) text.</p>
<p>I like to play <del>Cricket</del> Football.</p>
</body>
</html>

Output:
2.6 Text Style
The appearance of an HTML page can be changed with the style attribute.
The syntax of the HTML style attribute is given below:

<tagname style="property:value;">

The property is a CSS property (Cascading Style Sheet, used for enhancing the look of any
document). The value is a CSS value.

2.6.1 HTML Background Color


We can set the background color of any HTML page by using the background-color property.
The below example shows how to set the background color of a page to powder blue:

Example:

<!DOCTYPE html>
<html>
<body style="background-color:powderblue ;">
<h1>Example of Background Color changing.</h1>
<p>Example of Background Color changing.</p></body>
</html>

Output:

2.6.2 HTML Text Color


The text color of an HTML page can be change by using color property which is shown below
with an example.

Example:

<!DOCTYPE html>
<html>
<body>
<h1 style="color:blue;">Example of Blue color text.</h1>
<p style="color:red;">Example of Red color text.</p>
</body>
</html>

Output:

Example of Blue color text.

Example of Red color text.

2.6.3 HTML Text Size


The size of the font in a HTML document can be set according to our requirement by using font-
size property and it is illustrated below with a simple example:

Example:

<!DOCTYPE html>
<html>
<body>
<h1 style="font-size:300%;">The font size is very large.</h1>
<p style="font-size:160%;">The font size is big.</p>
<p style="font-size:60%;">The font size is small.</p>
</body>
</html>

Output:
2.6.4 HTML Text Alignment
For alignment of the text of HTML pages, there are four text-align property (left, center, right
and justify) that are frequently used. It defines the horizontal text alignment for an HTML
element. The example given below shows the method for center alignment text:

Example:

<!DOCTYPE html>
<html>
<body>

<h1 style="text-align:center;">Centered Heading</h1>


<p style="text-align:center;">Centered paragraph.</p>

</body>
</html>

Output:

2.6.5 Changing a paragraph's background color


Here is an example of background color
Example:

<p style = "background-color: green">


The background color of the Paragraph is Green.
</p>

Output:

The background color of the Paragraph is Green.

2.6.6 Changing foreground and background color


Here is an example of foreground and background color
Example:

<p style = "color: blue";


“background-color: green”>
<p style “text-color: blue”; The text is Blue on a Green background color>
</p>
Output:

The text is Blue on a Green background color

2.6.7 Changing Font Family


Here is an example of comic sans family

Example:

<p style = "font-family: Comic Sans MS, Cursive">


This paragraph is in Comic Sans
</p>

Output:

This paragraph is in Comic Sans


2.6.8 Changing Font Size
Here is an example for font size 30.

Example:

<p style = "font-size: 30pt">


This paragraph is in 30 pts
</p>

Output:

This paragraph is in 30 pts


2.7 Adding Graphics to HTML Document

In the beginning, graphics was not supported by the web pages only texts are used. But later on
images and other types of multimedia files are embedded with web pages. The graphics are
embedded in a HTML pages using a simple tag which is represented by <IMG>. We can also
embed the images inside other elements such as anchors. When embedded inside an anchor, then
the user left clicks on the image, they will go to the designated link (rather, their browser will
load a file from the designated link). The <IMG> element has no ending tag. The syntax of
embedding an image is follows:

<img src=”tree.jpg”>
Here, src attributes defines a path pointing to the image from where we want to embed.
IMG Attributes

Sr. IMG Attributes Function of attributes


No.
1. ALT="Home" Image not found massage shows.
2. ALIGN="TOP" Set image alignment like left, right, top, bottom etc.
3. VSPACE=3 Upper and lower space in pixels of an image between texts.
4. HSPACE=5 Left and right space in pixels of an image between texts.
5. BORDER=10 Set a border around the image with a specific width.
6. HEIGHT=33 Set image height based on the browser height.
7. WIDTH=115 Set image width based on the browser height.
8. ISMAP It represents image map and user can point and click different
parts of the image to load other web pages.
9. USEMAP Specifies the client side image map file to be used.

Table 2.1 Image Attributes


The line break element, <BR> and the horizontal rule element <HR> may be placed inside the
<IMG> element.
An example of adding an image source.
Example:

<img src=”funny dog.jpg” alt=”funny dog sitting”.>

Output:

2.8 Tables

2.8.1 Defining an HTML Table with Border


An HTML <table> tags are used to create different table in our web pages. Each table row is
defined with the <tr> tag. A table header is defined with the <th> tag. By default, table headings
are bold and centered. A table data/cell is defined with the <td> tag. This is an example of
HTML table with border where border width is 1.

Example:
<!DOCTYPE html>
<html>
<Body>
<table border="1">
<tr>
<th>Student Name</th>
<th>Subject</th>
<th>Marks</th>
</tr>
<tr>
<td>Ram</td>
<td>HTML</td>
<td>87</td>
</tr>
<tr>
<td>Shyam</td>
<td>HTML</td>
<td>73</td>
</tr>
</table>
<Body>
</html>

Output:

2.8.2 Html Table Tags:

Tag Description
<table> Displays a table
<th> Represents a header cell in a table
<tr> A row in a table
<td> A cell in a table
<col> Specifies column properties for each
column within a <colgroup> element
<caption> A table caption
<colgroup> Specifies a group of one or more
columns in a table for formatting
<thead> Groups the header content in a table
<tbody> Groups the body content in a table
<tfoot> Groups the footer content in a table

Table 2.2 Table Tags

2.8.3 HTML Table without Border


If we want to create table without border, it will be created by not defining border size. This is an
example of a table without border.

Example:

<html>
<body>
<table style="width:100%">
<tr>
<th>Student Name</th>
<th>Subject</th>
<th>Marks</th>
</tr>
<tr>
<td>Ram</td>
<td>HTML</td>
<td>87</td>
</tr>
<tr>
<td>Shyam</td>
<td>HTML</td>
<td>73</td>
</tr>
<tr>
<td>Ghanshyam</td>
<td>HTML</td>
<td>67</td>
</tr>
</table>
</body>
</html>

Output:
2.8.4 HTML Table - Adding Cell Padding
To manage the spaces between the cell of a table and its border, we use Cell padding tags. If we
do not mention a padding, the table cells will be displayed without padding. This is an example
of a cell padding.

Example:

<!DOCTYPE html>
<html>
<head>
<style>
table, th, td {
border: 1px solid black;
border-collapse: collapse;
}
th, td {
padding: 20px;
}
</style>
</head>
<body>
<table style="width:100%">
<tr>
<th>Student Name</th>
<th>Subject</th>
<th>Marks</th>
</tr>
<tr>
<td>Ram</td>
<td>HTML</td>
<td>87</td>
</tr>
<tr>
<td>Shyam</td>
<td>HTML</td>
<td>73</td>
</tr>
<tr>
<td>Ghanshyam</td>
<td>HTML</td>
<td>67</td>
</tr>
</table>
<p>Try to change the padding to 15px.</p>
</body>
</html>

Output:

2.9 Linking Documents


HTML Links – Hyperlinks

In a web page, several links are used to directly access the other pages or other parts of a given
page. These links are also known as hyperlinks which allows user to switch between different
web pages. When we move the mouse over a link, the mouse arrow will turn into a little hand.

Note: A link does not have to be text. It can be an image or any other HTML element.

Other tags
 <a> tag is an anchor tag which represents a link to reach the new linked document.
 href attribute is used to link the address of the web pages by url.
 target attribute to define where to open the linked document
 <img> tag (inside <a>) to use an image as a link
 id atribute (id="value") to show a bookmarks in web page
 href attribute (href="#value") to link to the bookmarks
<a href="/html/default.asp">HTML tutorial</a>

This is an example of a hyperlink.

Example:

<!DOCTYPE html>
<html>
<body>
<p><a href="https://www.google.com">Visit google website</a></p>
</body>
</html>

Output:

2.10 Frames
In HTML pages, frames allow multiple views to the user and we can browse window into
multiple sections with a separate HTML document. A browser contains many frames in a
window which is known as a frameset. The window frames are divided into rows and columns
in similar way as table are organized.

Disadvantages of Frames

Due to some major drawbacks of frame in window, it is never recommended to use frames in
our webpages −

 In smaller screen, frames do not cop-up properly because their screen is not big enough
to be divided up.
 Sometimes our page will be displayed differently on different computers due to different
screen resolution.
 The browser's back button might not work as the user hopes.
 There are still few browsers that do not support frame technology.

Creating Frames

To use frames on a page we use <frameset> tag instead of <body> tag. The <frameset> tag
defines how to divide the window into frames. The rows attribute of <frameset> tag defines
horizontal frames and cols attribute defines vertical frames. Each frame is indicated by <frame>
tag and it defines which HTML document shall open into the frame.

2.11 Summary
HTML is a structured programming language (Structured programming is paradigm aimed at
improving the clarity, quality, and development time of a computer program) which provides a
set of rules for correct application of elements. The browser renders (display) the HTML code
for correct representation and orientation of content. At times, the rules laid down in HTML are
interpreted differently by browser which provides the programmers an opportunity to exploit this
vulnerability. HTML is essentially a tag-based language. The documents start with the
<! DOCTYPE> tag. The entire document is encapsulated within <HTML> (opening and closing)
tags. The document is further divided into header and body sections specified by <HEAD> and
<BODY> tags, respectively. The header section is used to provide the descriptive information
related to the web document and needs to contain the <TITLE> tag to define the title of the page.
The body section of the web document contains information regarding placement of various
elements of the document. Block-level elements, text-level elements, and special-character
entities are used to structure it. Some tags are used for providing certain logic and the others are
for physical representation. The HTML elements discussed so far are of basic nature and are
widely used over all systems. They are utilized to customize the document presentation.
However, a complete look of the web document cannot be achieved simply using these basic
tags.

2.12 Questions for Exercise


1. Define HTML Tag and list a few basic tags used in HTML.
2. What is a list? Why do we use them?
3. What are the different types of lists used?
4. Why bold and italic tags are used? Illustrate using suitable example.
5. How do we create frames? What are the disadvantages of using frames?
6. Show with an example the use of different heading types.
7. How to assign different colors in a HTML document?

2.13 Suggested Readings


 Behrouz A. Forouzan. 2012. Data Communications And Networking, Fifth Edition.
New York: the McGraw-Hill Companies Inc.
 William Stallings. 2007. Data And Computer Communications Eighth Edition. New
Jersey: Person Education,Inc.
 Douglas E. Comer.2003. The Internet Book. Singapore: Pearson Education Pte. Ltd.
 M.Srinivasan. 2012. Web Technology Theory and Practice. India: Dorling Kindersley
Pvt.Ltd.
 Raj Kamal. 2006. Internet and Web Technologies. India: The Tata McGraw-Hill
Publishing Company Limited.

You might also like