ClassX CA Notes
ClassX CA Notes
The Internet has gained popularity and emerged as an important and efficient means of
communication.
The term Internet is derived from the words ‘interconnection’ and ‘networks’. A network is
a collection of two or more computers, which are connected together to share information
and resources. The Internet is a worldwide system of computer
networks, i.e. network of networks. Through Internet, computers become able to exchange
information with each other and find diverse perspective on issues from a global audience.
Most of the people uses Internet for sending and receiving E-mail and net surfing for
retrieving information.
HISTORY OF INTERNET:
In 1969, the University of California at Los Angeles and the University of Utah were
connected with the beginning of the ARPANET (Advanced Research Projects Agency
Network) using 56 kbit/s circuits, which is sponsored by U.S. (United States) Department of
Defence (DoD). The goal of this project was to connect computers at different Universities
and U.S. (United States) defence.
In mid 80’s another federal agency, the National Science Foundation (NSF) created a new
high capacity network called NSFnet (National Science Foundation Network), which was
more capable than ARPANET. The only drawback of NSFnet was that it allowed only
academic research on its network and not any kind of private business on it. Now, several
private organisations and people started working to build their own networks, named
private networks, which were later (in 1990’s) connected with ARPANET and NSFnet to
form the Internet. The Internet really became popular in 1990’s after the development of
World Wide Web (WWW).
WORKING OF INTERNET:
The computers on the Internet are connected to each other through small networks. These
networks are connected through the gateways to the Internet backbone.
All computers on the Internet, communicate with one another using TCP/IP, which is a
basic protocol (i.e. set of rules) of the Internet. TCP/IP (Transmission Control
Protocol/Internet Protocol) manages the transmission of data/file/document on the Internet
by breaking the data/file/document into small pieces or parts called packets or datagram.
Each packet contains actual data and address part, i.e. addresses of destination and source
up to 1500 characters. Functioning of TCP and IP are as follows:
TCP: It breaks message into smaller packets that are transmitted over the Internet
and also reassembles these smaller packets into the original message that are
received from the Internet.
IP: It handles the address part of each packet, so that the data is sent to the correct
address. Each gateway on the network checks this address to see where to forward
the message.
USES OF INTERNET:
Internet has been the most useful technology of the modern time, which helps us not only in
our daily lives, but also in our personal and professional lives developments. Thus, some
uses of Internet are as follows:
Advantages of Internet
Disadvantages of Internet
1. Cyber frauds may take place involving credit/ debit card numbers and details.
2. Unsuitable and undesirable material is available that sometimes can be used by
notorious people such as terrorists.
3. It is a major source of computer viruses.
4. Messages sent across the Internet can be easily intercepted and are open to abuse by
others.
5. It is difficult to check the accuracy of information available on the Internet.
Internet is not governed by any single organisation. Some volunteer groups had been
formed to help, coordinate and wrist with the development of the Internet.
These organisations are as follows:
There are mainly three ways of connecting to the Internet, which are as follows:
Connection
Advantages Disadvantages
types
(a) Easily available. (a) Slower than broadband.
(b) Available at low cost. (b) Needs expensive set-up.
Dial-up
(c) Can be used through fixed or
(c) Phone remains busy.
cellular phone.
(a) Telephone can be used with Internet
(a) Expensive than dial-up.
connection.
Broadband
(b) Faster than a dial-up connection. (b) Not available in all areas.
(c) Always on type of connection. (c) Needs expensive set-up.
(a) No phone line required. (a) Vulnerable
(b) Easy and inexpensive to setup. (b) Not much secured.
Wireless (c) No limitation of location. (c) Limited security mechanisms.
(d) Medical disadvantage can cause
(d) Connectivity is never a problem.
one cancer.
Satellites which are orbiting around the earth provide necessary links for telephone and
television service. They can also provide links for broadband. Satellite broadband is another
form of wireless broadband and is also useful for serving remote or sparsely populated
areas.
CHECK POINT
It is a system of Internet servers that supports hypertext and multimedia to access several
Internet protocols on a single interface. It is often abbreviated as the Web or WWW. It is a
way of exchanging information between computers on the Internet, trying to tie them
together into a vast collection of interactive multimedia resources. It is only a portion of
what makes up the Internet, but it is the fastest growing part of the Internet.
The Web lets people, organisations and companies publish information for other people to
see. This makes the Web a very useful tool for finding information about any topic.
PROTOCOL: It refers to a set of rules that co-ordinates the exchange of information. Both the
sender and the receiver should follow the same protocol to communicate data.
Protocols of the Web
HTTP (Hyper Text Transfer Protocol): A protocol that transmits hypertext over
networks. It is the stateless protocol of the Web.
SMTP (Simple Mail Transfer Protocol): It distributes E-mail messages and attached
files to one or more electronic mail boxes, e g. Gmail
FTP (File Transfer Protocol): It transfers files between a server and a computer, e.g.
Filezilla.
VoIP (Voice over Internet Protocol): It allows delivery of voice communications over
IP networks, e.g. Skype.
POP (Post Office Protocol): It is the primary protocol behind E-mail communication
e.g. Outlook.
IMAP (Internet Message Access Protocol) It is a standard protocol for accessing E-
mail from your local server, e.g. broadband mechanisms.
WWW Attributes
User-friendly: The WWW resource works smoothly with most Web browsers, such
as Internet Explorer, Firefox etc.
Multimedia documents: WWW allows users to create and display Web pages that
contain various graphics, audio, video, animation and text.
Interactive: WWW provides interactivity using hyperlinks and input boxes (i.e.
textboxes and checkboxes).
Frames: WWW support frames that allow users to display more than one
independent section on a single Web page.
Hypertext is the text that appears on the page, on which we can click and reach to another
page with which it is linked. Hypertext is also a combination of hyperlinks and multimedia.
Hyperlink or dynamic link simply called a link, may be an icon, graphic or text in a
document that links to another document.
WEB PAGE:
The backbone of the World Wide Web is made up of files or documents called pages or Web
pages, that contain information and links to resources both text and multimedia. It is created
using HTML (Hyper Text Markup Language). The Web is a collection of large number of
computer documents or Web pages that are stored on computers around the world which
are connected to one another using hyperlinks.
WEBSITE:
A group of related Web pages that follow the same theme and are connected together with
hyperlinks is called a Website. In other terms, “A Website is a collection of digital
documents, primarily HTML files, that are linked together and that exist on the Web under
the same domain”. A Website displays related information on a specific topic. Each Website
is accessed by its own address known as URL (Uniform Resource Locator). e.g.
http://www.carwale.com is a Website, while http:// www.carwale.com/new/ is a Web
page. Two terms that are associated with a Website are as follows:
I. Home Page: The main or first page of a Website is known as home page.
Advantages of Home Page:
a. It helps viewers to find out what they can find on that particular site.
b. It helps in the Publicity of on individual or community.
c. It makes the visitors more comfortable with the website.
II. Web Portal: It is a Web page that combines useful information and links.
Advantages of Web Portal:
a. Easy for users to customize personal places.
b. It provides communication between portals (i.e. between different
applications).
c. It provides flexible content and layout.
WEB BROWSER: It is a software application that is used to locate, retrieve and display
some content on the World Wide Web, including Web pages. These are programs used to
explore the Internet. It is an interface that helps a computer user to gain access over all the
content on the Internet. We can install more than one Web browser on a single computer.
The user can navigate files, folders and Websites with the help of a browser.
There are two types of Web browsers, which are as follows:
I. Text Web Browser: A Web browser that displays only text-based information is
known as text Web browser, e.g. Lynx.
II. Graphical Web Browser: A Web browser that supports both text and graphic
information is known as graphical Web browser. e.g. Internet Explorer, Firefox,
Netscape, Safari, Google Chrome, Opera.
NETSCAPE – It was introduced in 1994. Netscape comprises the major portion of the
browser’s market.
INTERNET EXPLORER (IE) – It is a product of Microsoft. This is the most commonly used
browser in the world. This was introduced in 1995 alongwith Windows 95 launch and it has
passed Netscape popularity in 1998.
FIREFOX – It is a new browser derived from Mozilla. It was released in 2004 and has grown
to be the second most popular browser on the Internet.
GOOGLE CHROME – This Web browser was developed by Google. Its beta and
commercial versions was released in September 2008 for Microsoft Windows.
OPERA – It is smaller and faster than most other browsers, yet it is fully featured. It is the
most popular mobile Web browser.
CHECK POINT:
WEB ADDRESS AND URL: Web is a collection of documents (Web pages) stored on
computers around the world. Each Web page has an address describing where it can be
found. This address is known as Web address or domain name. A Web address identifies
the location of a specific Web page on the Internet, such as http://www.1earnyoga.com. On
the Web, Web addresses are called URLs. It is the Web address for a Website or a Web page.
The URL specifies the Internet address of a file stored on a host computer connected to the
Internet.
Parts of URL: The URL contains three parts, which are as follows:
Types of URL
DOMAIN NAME:
It is the text name corresponding to the numeric IP address of a computer on the Internet.
Internet users access your Website using your domain name. It is a way to identify and
locate computers connected to the Internet. It must be unique. Domain name always have
two or more parts, separated by periods (dots). e.g: google.com, yahoo.com etc.
Domain Abbreviation:
Domain are organised by the type of organisation and by the country. A three letter
abbreviation indicating the organisation and usually two letter abbreviation indicating the
country name. Most common domain abbreviations for organisation are as follows:
In India
au Australia
fr France
nz New Zealand
uk United Kingdom
IP addresses are in aaa.aaa.aaa.aaa format, where each aaa is a number from 0 to 255. The
length of IP address is 4 bytes. IP addresses identify the host computers; so that packets of
information reached to the correct computer, e.g. 162.192.1.89
The IP address has the following characteristics:
E-MAIL ADDRESS
E-mail stands for ‘Electronic Mail’. It is a paperless method of sending messages, notes,
pictures and even sound files from one place to another using the Internet as a medium. It is
an individual name, which is used to send and receive E-mail on the Internet. It is used to
specify the source or destination of an E-mail message.
Some sites which provide the E-mail services are Gmail, Yahoo! mail, Rediffmail etc.
BLOGS
A blog is a Website or a Web page, in which an individual records opinion links to other
sites on regular basis. Blog content is written frequently and added in a chronological order.
It is written online and visible to everyone. A typical blog combines text, images and links to
other blogs, Web page? and other media related to its topic. In education, blogs can be used
as instructional resources. These blogs are referred to as edublogs. The entries of blog are
also known as posts. A person who writes a blog or a Weblog is known as blogger. Blogging
is the act of posting content on a blog.
Advantages of Blogs
1. You can work at any time of the day and work with your ease.
2. Blogger does not require more efforts to write articles for his/her blog.
3. Easy and quick to update or add new posts.
4. People can leave comments on your blog.
5. It increases blog revenue.
6. Blogs can be set-up quickly.
7. It is all about being social. You (blogger) need to answer to peoples’ queries and
for that, reading should be a part of day-to-day tasks.
Disadvantages of Blogs
NEWSGROUP
An area on a computer network especially the Internet, devoted to the discussion of a
specified topic is known as Newsgroup.
Newsgroup is an online discussion group that allows interaction through electronic bulletin
board system (Usenet) and chat sessions. To simplify the selection of suitable newsgroup,
they are divided into subject classification which is as follows:
A newsgroup is a worldwide platform for exchanging its content, ideas and information by
common minded people. Newsgroup and contents are stored on special servers called
Network News Transfer Protocol (NNTP) servers. The groups can be either “moderated”,
where a person or group decides which postings will become part of the discussion
“unmoderated”, where everything posted is included in the discussion. e.g. alt.tennis,
alt.astrology, comp.lang. C++ etc.
Advantages of Newsgroup
1. Newsgroup is similar in some ways to mailing lists, but it has a better structure.
2. It is also easier to access a newsgroup.
3. Usually, you will be able to find a FAQ (Frequently Asked Question ) section on a
newsgroup, which is always helpful for those who are not sure of certain things.
4. Free to subscribe and post.
Disadvantages of Newsgroup
It is the protocol used to transfer data over the World Wide Web. It defines how messages
are formatted and transmitted and what actions should be taken by the Web servers and
browsers in response to various commands. e.g. when you enter a URL in your browser, this
actually sends a HTTP command to the Web server
directing it to fetch and transmit the requested Web page.
The other main standard that controls how the World Wide Web works is HTML, which
covers how Web pages are formatted and displayed. HTTP is a stateless protocol because
each command is executed independently without any knowledge of the commands that
came before it.
It is used for designing Web pages. A markup language is a set of markup (angular bracket,
<>) tags, which tells the Web browser, how to display a Web page’s words and images for
the user. Each individual markup code is referred to as an element or a tag. The text placed
between a pair of angular brackets (<>) defines an HTML element.
HTML elements have two basic properties, i.e. attributes and content.
Attributes are used to apply the desired style on the text and content refers to the text that
you want to display on the browser. When a Web page is opened in a Web browser, then the
formatted content is displayed.
CHECK POINT
Working of FTP:
FTP works on the principle of a client/server model. A FTP client program enables the user
to interact with a FTP server program in order to access information and services on the
server computer. To access FTP server program, users must be able to connect to internet or
interact with FTP client program. FTP based communication makes use of the following two
channels:
1. Control channel (A channel for commands) Remains open for the entire session
between the client and the server.
2. Data channel (A channel for data) Open and close only when data has to be
transferred between the client and the server.
Advantages of FTP:
1. FTP is the fast and efficient way of transferring bulk of data across the Internet.
2. It has an automatic backup. Whenever you edit your files in your local system you
can update the same by copying it to the host system in your site.
3. FTP gives you control over transfer. The data can be transferred either in text files or
in the binary form.
4. You can work with the directories on the remote systems, delete or rename the
remote files while transferring data between two hosts.
5. While using FTP, tools like macros can also be used to make your work more
efficient and easier.
Disadvantages of FTP
1. FTP was not designed to be a secure protocol.
2. Encryption of data can’t be done in FTP.
3. FTP causes spoof attacks during the transfer of data.
4. Filtering active FTP connections is difficult.
CHAT
It is the online textual or multimedia conversation. It is a real-time communication between
two users via computer. It is widely interactive text-based communication process that takes
place over the Internet. Chatting is a virtual means of communication that involves the
sending and receiving of messages, share audios and videos between users located in any
part of the world.
In addition, there are many browser based services that do not require downloaded chat
program, e.g. Facebook has a built-in chat feature and gmail allows you to chat with your
contacts whenever you are logged into your gmail account. There are two basic modes for
chatting on the Internet as follows:
1. Text-based chat Enables communication through sending and receiving text
messages.
2. Multimedia chat Enables communication through audio and video transmission. A
chat room is the hub of Internet chatting. Chat rooms (virtual room) are actually chat
servers that allow several users to login to them simultaneously. After joining a
room, you can read the messages of other users and send your own messages to
them or to anyone else.
3. Advantages of Chat
1. Photos can be sent using an instant messaging.
2. Emotions can be expressed easily when communicating with a person.
3. It is almost same as talking to someone face-to-face.
4. You can also chat in a group.
5. It makes it possible for user to keep in contact and chat to each other even if; they are
in different countries without having to pay a lot of money.
Disadvantages of Chat
1. Viruses can be easily spread via texting.
2. Children tend to spend more time in chatting with friends instead of bonding with
their family and studies.
E-MAIL
It is an electronic version of sending and receiving letters. The E-mail is transmitted between
computer systems, which exchange messages or pass them onto other sites according to
certain Internet protocols or rules for exchanging E-mail. You can send E-mail from your
computer at anytime to any address around the world and your electronic letter or E-mail
will arrive at its destination in seconds after you send
it, even if the receiver is not online. For sending and receiving an E-mail, you must have an
E-mail account, which is either a Web based online E-mail account or an E-mail account on
your ISP server. Web based online E-mail account can be created through many sites like
Gmail, Yahoo mail, Rediffmail etc.
Advantages of an E-mail
1. E-mail speeds up the workflow process, documents can be sent for comments and
corrections can be made quickly.
2. E-mailing saves papers and printing costs.
3. Multiple copies of a message can be sent to a group of people.
4. Messages can be prepared in advance and save until you are ready to send them.
5. File and images can be attached to an E-mail.
Disadvantages of an E-mail
1. E-mail attachments can carry viruses.
2. Limited size of data file can be sent.
3. Hasty medium to convey emotions.
4. No guarantee that the mail will be read until the user logs on and checks E-mail.
VIDEO CONFERENCING
It is a communication technology that integrates videos and audios to connect users
anywhere in the world, as if they are in the same room. This term usually refers two way
communication between two or more users who are in at least two different locations, rather
than one-to-one communication and it often includes multiple people at each location. Each
user or group of users who are participating in a video conference typically must have a
computer, a camera, a microphone, a video screen and a sound system. Basically, this is a
system that allows you to conduct meetings or trainings in different places simultaneously.
So, this technology is most popular in the field of business because it allows meetings or
conferences to be held without the need for all the participants to travel to a single location
and thus it saves time and money. Many people can hear and see each other, share
whiteboard and other applications through video conferencing.
Advantages of an E-Learning
1. Class work can be scheduled around office and family.
2. Reduces travel time and travel costs for off-campus students.
3. Self-paced learning modules allow students to work at their own pace.
4. Learning can accommodate, different learning styles and facilitate learning through a
variety of activities.
5. Develops knowledge of an Internet and computer skills that will help learners
throughout their life and career.
6. Successfully completed online or computer based courses build self-knowledge and
self-confidence and encourages students to take responsibility for their learning.
Disadvantages of an E-Learning
1. Without the routine structures of a traditional class, students may get lost or
confused about course activities and deadlines.
2. Students may feel isolated from an instructor and classmates.
3. Instructor may not always be available when students are studying or need help.
4. Slow Internet connections or older computers may make accessing course materials
frustrating.
5. Hands-on or lab work is difficult to simulate in a virtual classroom.
In Internet banking system, the bank has a centralised database, i.e. is Web enabled. All the
services that the bank has permitted on the Internet are displayed in menu. Any service can
be selected and further interaction is dictated by the nature of service. It allows customers to
access account specific information and possibly conduct transactions from a remote
location such as at home or at workplace.
Customers can access E-banking services using an intelligent electronic devices, such as a
Personal Computer (PC), Personal Digital Assistant (PDA), Automated Teller Machine
(ATM), kiosk or touch tone telephone.
E-banking can be broadly classified into the two categories, which are as follows:
1. Transactional It involves performing financial transactions. Transactional activities
are as follows:
a. Electronic fund transfer
b. Bill payments
c. Loan application and repayments
d. Buying investment products
2. Non-Transactional It involves viewing bank statements. Non-transactional activities
are as follows:
a. Account balance viewing
b. Bank statement downloading
c. Cheque book ordering
d. Provision of account/bank statement
Advantages of an E-Banking
1. There are no geographical barriers and the services that can be offered at a minimum
cost.
2. Through Internet banking, you can check your transactions at any time and as many
times as you want to.
3. If the fund transfer has to be made outstation, where the bank does not have a
branch, the bank would demand outstation charges, whereas with the help of online
banking, it will be absolutely free for you.
4. Internet banking deploys the Internet as a medium for financial transaction.
e.g. a customer login to his or her bank account by accessing the bank Website.
Disadvantages of an E-Banking
1. Understanding the usage of Internet banking might be difficult for a beginner at the
first time.
2. You cannot have access to Internet banking, if you don’t have an Internet connection.
3. Security of transactions is a big issue. User’s account information may get hacked by
unauthorised people over internet.
Mobile Banking:
It is a way for the customers to perform E-Banking actions on his/her mobile phone r other
mobile devices. It is a quite popular method of banking. It might also be referred as M-
Banking or SMS Banking. Services of M-Banking are as follows:
1. Account information
2. Transaction
3. Investments SMS service
Advantages of E-Shopping
1. Finding a product online is much more easier than looking for it in the local store.
2. Now-a-days online shopping is very reliable.
3. Most of the stores provide money back guarantee.
4. You have infinite options to choose a product.
5. If you do not find any product within your country then you can shop online from
an international store.
Disadvantages of E-Shopping
1. The customer might be worried as to the similarity of the product being ordered and
the product being received.
2. You have to wait for delivery.
3. You may be a victim of online fraud.
4. You may have to pay for shipping, while returning.
5. You cannot really see/feel the items, you purchase.
Advantages of an E-Reservation
1. Real-time process (if you book a seat, it will automatically be updated so, no one else
can take that seat. If you used an agent that did not use computers, they would need
to call other agents saying ‘Seat X had been taken’).
2. Can access more information and find other details online about your reservation.
3. Websites can compare different flight prices and details.
Disadvantages of an E-Reservation
1. Need an Internet and PC experience.
2. Might need a credit card or some other form of payment.
3. Viruses/Torjans may steal your information.
4. If the Websire is not working properly then, due to some server issue, reservation
can’t be done.
Advantages of an E-Groups
1. It helps to create and maintain social relationship.
2. It facilitates communication among members.
3. It facilitates research as members assist one another.
4. It facilitates learning.
5. Less time and cost is used.
6. It keeps members abreast with new development and knowledge.
Disadvantages of an E-Groups
1. There is no privacy, if intimate issues are discussed.
2. Every wrong information has a negative impact on each other.
3. It is hard to follow the logical sequence of discussion.
SOCIAL NETWORKING
It is the grouping of individuals into specific groups, like small rural communities or a
neighbourhood subdivision. This service is an online service, platform or site that focuses on
facilitating the building of social networks or social relations among people.
e.g. who share interests, activities, backgrounds or real life connections. When it comes to
online networking, social networking Websites are commonly used. These Websites are
known as social networking sites.
i. Hyper Text is simply a piece of text that has some extra features like formatting,
images, multimedia and links to another document.
ii. Markup Language is a way of writing layout information within documents. HTML
is a page layout and hyperlink specification language. It allows images and other
objects to be embedded that can be used to create interactive forms. HTML
documents are described through HTML tags or elements.
HTML is written in the form of tags. A tag refers to a string enclosed within angular
brackets (< and >). HTML elements represent semantics or meaning.
There are two kinds of elements, i.e. Container elements and Empty elements.
Container Elements
These types of HTML elements always wrap around the text or graphics which come in a set
with an opening as well as a closing tag. In other words, HTML tags that include both On
and Off tags are known as container tags. E.g.
<HTML>.. .</HTML>
Empty Elements
On the other hand, the empty elements are standalone tags, i.e. empty tags do not have to be
wrapped around text or graphics and do not require a closing tag. In other words, HTML
tags that include only On tag and there is no Off tag then, these tags are known as empty
tags. E.g.
HTML STRUCTURE
HTML document is a combination of various tags, which define the structure and
appearance of the Web page.
Following four basic structure elements are always present in every HTML document:
(i) The <HTML> tag tells the browser that this is an HTML document. You must
begin your html files with this tag and must end your html file with matching
closing tag.
(ii) The <HEAD> tag is used for text and tags that do not appear directly on the
page. It acts as a header of file and contains some information like setting the title
of the Web page.
(iii) The <TITLE> tag contains the document title. This tag lies between <HEAD> and
</HEAD> tags. The title specified inside this tag appears on the browser’s title
bar.
(iv) The <BODY> tag is used for text and tags that appears directly on the Web page.
It helps us to create a look and feel of the Web page. It holds all your content
words, pictures and other stuff. The most basic structure needed for creation of
any Web page are as follows:
Since, HTML documents are just text files, they can be written in any simple text editor like
Notepad, FrontPage, Dreamweaver, WordPad etc.
If you are using a Notepad to create a HTML document, the steps are as follows:
Open Notepad by clicking at Start —> All Programs —> Accessories —> Notepad.
Type the HTML document in Notepad as shown below:
<HTML>
<HEAD>
<TITLE>HTML</TITLE>
</HEAD>
<BODY>
This is a HTML document.
</BODY>
</HTML>
To save the document, click at File menu —> Save As command.
The Save As dialog box will.
In Save As dialog box, after selecting the desired folder, give the desired file name
along with the extension .htm or .html in the File name: box and then, click Save
button.
You can view HTML document in any Web browser such as Internet Explorer, Mozilla
Firefox, Opera, Apple Safari, Netscape Navigator, Google Chrome etc. Here, we are using
Internet Explorer Web browser to view the HTML document. To view an HTML document,
the steps are as follows:
Open Internet Explorer, by clicking at Start —> All Programs —> Internet Explorer.
To open the document First.html, select File menu —> Open.
The Open dialog box will appear as in the following figure:
Click the Browse… button, the Microsoft Internet Explorer dialog box will appear
and select the file.
Click Open button, and then click OK button.
Now, you will be viewing your desired page.
HTML provides some basic tags which are required for HTML code.
<HTML>Tag
It represents the root of an HTML document, so it acts as a container for all other HTML
elements. It informs the browser that it is dealing with an HTML document. It is very
important to place both of these tags (open and close HTML tags) in your documents as they
tell the browser, where your page begins and ends. E.g.
<HTML>
</HTML>
Attributes of <HTML> Tag
DIR
It tells the browser the direction in which the displayed text is to be read. This attribute can
have values either ltr (left-to-right) or rtl (right-to-left). By default, the value of dir attribute
is ltr.
Syntax
<HTML dir=“ltr"/“rtl”>
LANG
It specifies the language of an element content and attribute values. Now-a-days, Web pages
are designed in many languages, e.g. German, Hindi, Greek, Spanish etc.
Syntax
<HTML lang=“fr”>
This element is a container for all the header elements. The <HEAD> tag must include a title
for the document that can include scripts, styles, meta information and many more. The
second line of your HTML document should be <HEAD>.
The content contained in the head section of your document provides information to the
browsers and search engines but, it is not displayed directly on the Web page. The end of
the head tag is indicated by </HEAD>.
E.g.
<HTML>
<HEAD>
Header information comes here
</HEAD>
</HTML>
<TITLE> Tag
This tag defines the title of the document. Title must be a simple text and should not be same
as the file name. It is placed between <HEAD> and </HEAD> tags.
E.g.
<HTML>
<HEAD>
<TITLE>
This is the title of my page.
</TITLE>
</HEAD>
</HTML>
Output
<BODY> Tag
This tag defines the document’s body. It is used to set the basic page characteristics. It
contains all the necessary contents of a HTML document, such as text, hyperlinks, images,
tables, lists etc. The content of your Web page is placed in between the opening <BODY>
and closing </BODY> tags.
The <BODY> tag is opened just after the head section is closed. It is closed just before
closing the <HTML> tag.
E.g.
<HTML>
<HEAD>
<TITLE>
My First Web Page
</TITLE> .
</HEAD>
<BODY>
Hello world. This is my first web page. </BODY>
</HTML>
Output
background
This attribute specifies a background image for a document. HTML supports various
graphics format such as .gif, .jpg etc.
Syntax
<BODY background=“URL”>
Where, URL may be an image name or a path of an image. E.g.
<HTML>
<HEAD><TITLE>
Background Image </TITLE></HEAD>
<BODY background ="image.jpg”>
</BODY>
</HTML>
Output
text
Syntax
<BODY text=“color_name|hex_number|rgb_number”>
Attribute Values
Value Description
Color name Specifies the text-color with a color name (like “red”).
hex_number Specifies the text-color with a hexadecimal code (like “#FF0000”) where #
stands for the color number.
rgb_number Specifies the text-coior with a rgb(red, green, blue) code (like
“rgb(255,0,0)”).
E.g. <HTML>
<BODY text=“red”>
Arihant Publication </BODY>
</HTML>
bgcolor
Syntax
<BODY bgcol or=“color_name|hex_number|rgb_number”>
E.g. <HTML>
<BODY bgcolor="red”>
</BODY>
</HTML>
link
This attribute specifies the color of an unvisited link in a document. The default color of link
attribute is blue (#0000FF).
Syntax
<BODY 1ink=“color_name|hex_number|rgb_number”>
E.g. <HTML>
<BODY Iink=“red”>
</BODY>
</HTML>
alink
This attribute specifies the color of an active link in a document (a link get activated when it
is clicked). The default color of an alink attribute is red (#FF0000).
Syntax
<BODY alink=“color_name|hex_number|rgb_number”>
E.g.
<HTHL>
<BODY alink=“blue”>
</BODY>
</HTML>
vlink
This attribute specifies the color of a visited link in a document. The default color of vlink
attribute is purple (#800080).
Syntax
<BODY vl i nk=‘‘col or_name | hex_number | rgb_number”>
E.g.
<HTML>
<BODY vlink=‘‘bl ue”>
</B00Y>
</HTHL>
topmargin
Sets a topmargin (distance between the top of the document and the top of the browser
window) of your body element.
Syntax
<BODY topmargin=“value”>
E.g.
<HTML>
<HEAD>
<TITLE> Topmargin </TITLE>
</HEAD>
<BODY topmargin=“65”>
Arihant Publications is one such reputed name in the field of books which has
the best available books in the market. </BODY>
</HTML>
leftmargin
Sets a left hand margin (distance between the left side of the document and the left edge of
the browser window) of your body element.
Syntax
<BODY 1eftmargin=“value”>
E.g. <HTML>
<HEAD>
<TITLE> Leftmargin </TITLE>
</HEAD>
<BODY 1eftmargin=“65”>
Arihant Publications is one such reputed name in the field of books which has
the best available books in the market. </BODY>
</HTML>
<FONT> Tag
This tag specifies the font face, font size and font color of the text. The <FONT> tag provides
no real functionality by itself but with the help of a few attributes, this tag is used to change
style, size and color of HTML text elements. This tag is generally used for changing the
appearance of a short segment of text. It can be set for a character, sentence or entire
document.
size
This attribute specifies the size of the text inside a <FONT> tag. The range of accepted
values goes from 1 (the smallest) to 7 (the largest). We can also set the relative size to the
current size using (+) ve or (-) ve sign. E.g. size = +2
Syntax
<F0NT size=“number”>
Attribute Value
Value Description
Number A number from 1 to 7 that defines the size of the text. Default number of value
is 3.
E.g.
<HTML>
<HEAD>
<TITLE>Font Size </TITLE>
</HEAD>
<BODY>
<F0NT size=“4”>
This is the default size. </F0NT>
</BODY>
</HTML>
face
This attribute specifies the font name or type face of the text inside a <FONT> tag.
Syntax
<F0NT face=‘‘font_family”>
Attribute Value
Value Description
font_family The font name of the text specifies a prioritised list of several fonts, separate
the names with a comma (like <FONTface=“verdana,arial,sans-serif ”>.
E.g.
<HTML>
<HEAD>
<TITLE> Font Face </TITLE>
</HEAD>
<BODY>
<FONT face=“verdana”> This is some text! </F0NT>
</BODY>
</HTML>
color
This attribute specifies the color of the text inside a <FONT> tag.
Syntax
<FONT color=“color_name|hex_number|rgb_number”>
E.g.
<HTML>
<BODY>
<F0NT color=“red”>
This is some text!
</F0NT>
</BODY>
</HTML>
This tag specifies a default font color, font size or font family for all the text in a document
that follows it, which is only supported by Internet Explorer Web browser.
Ending tag </BASEFONT> is optional. This tag can also have face, size and color attributes,
which can be used exactly in the same way as face, size and color attributes of <FONT> tag.
<FONT>tag <BASEFONT>tag
The <FONT> tag has “ending” tag. The <BASEFONT> tag has optional
“ending” tag.
The <FONT> tag affects all text that lies The <BASEFONT> tag affects all text in a
between its starting and ending tags. document.
<CENTER> Tag
This tag is used to centralise a segment of text to be displayed on browser’s window. With
the <CENTER> tag, closing tag </CENTER> is always used. Anything between these two
tags will be centered including text, images or tables.
Syntax
<CENTER> ....</CENTER>
E.g.
<HTML>
<HEAD>
<TITLE>
Center
</TITLE>
</HEAD>
<BODY>
<CENTER>
This text will be center-aligned. </CENTER>
</BODY>
</HTHL>
Syntax
<! - -.... - ->
E.g.
<HTML>
<HEAD>
<TITLE>
Comment
</TITLE>
</HEAD>
<BODY>
<!- -
This is a comment.
- - > This is body.
</BODY>
</HTML>
Heading Tags
In HTML, heading tags are used to display the text as a heading. It can also be used to give
section headings. There are six levels of headings, ranging from <H1>…</H1> to
<H6>…</H6>. <H1> defines the most important largest heading level. <H6> defines the
smallest heading level.
Syntax
<Hn>...........</H n> Where, n may be any number from 1 to 6.
E.g.
<HTML>
<HEAD>
<TITLE>
Heading Level
</TITLE>
</HEAD>
<BODY>
<H1> level 1 Headline </H1>
<H2> level 2 Headline </H2>
<H3> level 3 Headline </H3>
<H4> level 4 Headline </H4>
<H5> level 5 Headline </H5>
<H6> level 6 Headline </H6>
</BODY>
</HTML>
Attribute of <HEADING> Tag
align
This attribute specifies the alignment of the text as heading. By default, alignment is left.
Syntax
<Hn align=“center|left | right | justify”>....</Hn>Where, n=l to 6
E.g.
<HTML>
<HEAD>
<TITLE> Heading in HTML </TITLE>
</HEAD>
<BODY>
<H1 align = “center”>level 1 Headl ine</Hl> <H2> level 2 Headline </H2>
<H3 align = “right”> level 3 Headline </H3> <H4> level 4 Headline </H4>
<H5 align = "center”> 1evel 5 Headline </H5> <H6> level 6 Headline </H6>
</BODY>
</HTML>
This tag is used to mark a block of text as a paragraph. It is used to insert a line break with
extra space in the beginning. This is a container tag.
Syntax
<P>.........</P>
E.g.
<HTML>,
<HEAD>
<TITLE>
Paragraph
</TITLE>
</HEAD>
<BODY>
<P>This is some text in a paragraph.</P>
</BODY>
</HTML>
This attribute specifies the alignment of the text within a paragraph. By default, alignment is
left.
Syntax
<P a1ign="left|right|center|justify”>......</P>
e.g.
<HTML>
<HEAD>
<TITLE>
P tag with align attribute </TITLE>
</HEAD>
<BODY>
<P align="right”>
This is some text in a paragraph. </P>
</BODY>
</HTML>
This tag is used to insert a line break which means the text/image following the tag will be
moved to the next line when displayed in the browser. To add a single line of space, you can
use a break tag <BR>. This is an empty tag, i.e. no need of closing tag. You can also use the
<BR> tag to insert one or more blank lines.
E.g.
<HTML>
<HEAD>
<TITLE>
Line Break
</TITLE>
</HEAD>
<BODY>
This text contains <BR> a line break.
</BODY>
</HTML>
To create a horizontal line on your page, you have to use the empty tag <HR>. This
horizontal line can be used to divide information into sections.
align
Syntax
<HR align=“left|center|right”>
E.g.
<HTML>
<HEAD>
<TITLE>
HR tag with align attribute </TlTLE>
</HEAD>
<BODY>
<HR align=“right”>
This is a line.
</BODY>
</HTML>
Output
size
This attribute specifies the height of the rule in pixels. A pixel is a tiny dot that makes up the
display of your computer. Its default value depends directly on the browser. The default
size of a rule is 3 pixels.
Syntax
<HR size="pixels”>
E.g.
<HTML>
<HEAD>
<TITLE>
HR tag with size attribute
</TITLE>
</HEAD>
<BODY>
<HR size=“3”>
This is a line.
</BODY>
</HTML>
noshade
When this boolean attribute is present, the rule is drawn with a solid black line as a 2D effect
instead of the default 3D effect, i.e. without shading.
Syntax
<HR noshade>
E.g.
<HTML>
<HEAD>
<TITLE>
HR tag with noshade attribute </TITLE>
</HEAD>
<BODY>
<HR size = "5” noshade>
<HR size= “5”>
This is a sol id line.
</BODY>
</HTML>
width
This attribute specifies the width of a horizontal line in pixels or percent. Its default value is
100%.
Syntax
<HR width=“pixels or %”>
e.g.
<HTML>
<HEAD>
<TITLE>
HR tag with width attribute </TITLE>
</HEAD>
<BODY>
<HR width=“50%”>
This is a line.
</BODY>
</HTML>
color
This attribute specifies the color of the horizontal line.
Syntax
<HR color="color_name|hex_number|rgb_number”>
E.g.
<HTML>
<HEAD>
<TITLE>
HR tag with color attribute
</TITLE>
</HEAD>
<BODY>
<HR color=“red”> .
This is a red line. .
</BODY>
</HTML>
Style Tags
Syntax
<B>. ..........</B>
E.g.
<HTML>
<HEAD>
<TITLE> Bold
</TITLE>
</H.EAD>
<BODY>
<P>
This normal text and <B> this is bold text. </B>
</P>
</BODY>
</HTML>
Syntax
<I>. ......</I>
E.g.
<HTML>
<HEAD>
<TITLE> Italic </TITLE>
</HEAD>
<BODY>
<I> Hello </I>
</BODY>
</HTML>
Syntax
<U>...........</U>
E.g.
<HTML>
<HEAD>
<TITLE> Underline </TITLE>
</HEAD>
<BODY>
<P> This is a <U> text </U> </P>
</BODY>
</HTML>
HTML LISTS
Sometimes, we are in hurry and do not like to read a lot of text. So, putting important
information in the form of a list seems to be helpful. HTML supports several elements for
making lists. They can be divided into two types of lists, i.e. Glossary lists and Regular lists.
Glossary lists are denoted by the element <DL>, while Regular lists are denoted by the
elements <UL>, <OL>, <MENU> and <DIR>. Lists can be nested, i.e. you can have a list
within a regular list, a regular list within a glossary list and so on.
List tags, like paragraph and preformatted text are generally HTML containers that are
capable of accepting other container and empty tags within their boundaries. These list tags
are responsible for affecting the spacing and layout of text, not the emphasis, so they are
applied to groups of text and allow individual formatting tags within them.
<LIST type>
<ITEM> First item in list
<ITEM> Second item in list
<ITEM> Third item in list
</LIST type>
Types of Lists
Unordered List <UL>: This list (also known as unnumbered list) is an indented list with a
bullet symbol in front of each list item. An unordered list starts with the <UL> tag. Each list
item starts with the <LI> tag. The list items are marked with bullets (typically small black
circles).
The unordered list tag is a container tag. The default bullet type for most Web browsers is a
full disc (black circle), but this can be adjusted using an HTML attribute called type.
Syntax
<UL>............</UL>
E.g.
<HTML>
<HEAD>
<TITLE>
Unordered List
</TITLE>
</HEAD>
<BODY>
<UL>
<LI>My first item on the list.</LI>
<LI>My second item on the list.</LI>
<LI>My third item on the list.</LI>
<LI>My fourth item on the i ist.</LI>
</UL>
</BODY>
</HTML>
type
This attribute is used to change the bulleted symbol in a list. The attribute may have a value
of circle, disc or square.
Syntax
<UL type="square/disc/circle”>
Ordered List <OL>: This list starts with the <OL> tag. Each list item starts with the <LI>
tag. The list items are marked with numbers. The ordered list tag is a container tag which is
used for numbered lists. By default, the numbering will be 1, 2, 3 … . You can also adjust the
numbering using type attribute.
Syntax
<OL>. ...</OL>
E.g.
<HTML>
<HEAD>
<TITLE> Ordered List </TITLE>
</HEAD>
<BODY>
<OL>
<LI> Rose </LI>
<LI> Lotus </LI>
<LI> Lily </LI>
</OL>
</BODY>
</HTML>
Type: The numbering of an HTML list can be changed to letters or roman numerals by the
type attribute.
Syntax
<OL type=“value”>
Value Description
1 The default, uses arabic numerals
I Uses uppercase roman numerals
i Uses lowercase roman numerals
A Uses uppercase letters
a Uses lowercase letters
Start: This attribute is used to change the beginning value of an ordered list. Normally, the
ordered list begins with 1. It lets you further customise an HTML ordered list by setting a
new starting digit for the ordered list element.
Syntax
<OL start=“value” type = “value”>
Definition List: This is a list of items, with a description of each item. HTML definition lists
(<DL>) are indented list without any bullet symbol or any number in front of each item. This
list elements have a unique array of tags and elements; the resulting lists are similar to those
you would see in a dictionary.
The terms DL, DT and DD stand for definition list, definition term and definition
description.
e.g.
<HTML>
<HEAD>
<TITLE>
Definition List
</TITLE>
</HEAD>
<BODY>
<DL>
<DT> Fromage </B>
<DD> French word for cheese
<DT> Voiture </B>
<DD> French word for car
</DL>
</BODY>
</HTML>
Nested List: List can be nested that means one list can be placed inside another. In the
nested list, one or more items can contain sub-items.
E.g.
<HTML>
<HEAD>
<TITLE>
Nested List
</TITLE>
</HEAD>
<BODY>
<UL>
<LI> Fruits </LI>
<OL type=“l”>
<LI> Mango </LI>
<LI> Apple </LI>
</OL>
<LI> Vegetables </LI>
<OL type=“l”>
<LI> Onion </LI>
<LI> Tomato </LI>
</OL>
</UL>
</BODY>
</HTML>
INSERTING AN IMAGE IN A WEB PAGE
HTML can be used to insert images in the following formats:
(i) GIF(Graphics Interchange Format)
(ii) XBM(X Bitmap)
(iii) JPG or JPEG 0oint Photographic Experts Group)
(iv) PNG (Portable Network Graphics)
The <img> tag is used to insert an image in a Web page. It is very important to know that images
are not technical part of the Web page file, they are separate files which are inserted into the Web
page, when it is viewed by a browser. So, a simple Web page with one image is actually two files.
When an HTML file is displayed in a browser, it requests the image file and places it on the page
where the tag appears.
Syntax
<img src = "image URL" [various attributes]>
Here, src attribute is used because it provides the information about the path of an image file to the
Web browser.
The src Attribute: The src (source) attribute takes URL (Universal Resource Locator) of an image
file as value, which points to the direct location of an image to be displayed. The image that you
specify in your <img> tag should be in your computer otherwise the image will not be displayed
and in place of image a cross mark in a box will appear.
Example 1. To display an image.
<html>
<head><title> Image </title></head>
<body>
<hl> Look at the image </hl>
<br><img src = "D:\image.jpg"></body></html>
The alt Attribute
This attribute of <img> tag is used to provide alternate text when an image on a Web page cannot
be displayed.
The alternative text is the text associated with an image that serves the same purpose and conveys
the same essential message. As per HTML standard, alt attribute is optional but is highly
recommended. Sometimes, the Web browser you are using does not display an image that is
inserted in the Web page because of slow connection, error in src attribute or if the user uses a
screen reader. In such cases, this attribute is specified to provides alternative information for an
image. Generally, it is a short description of an image. The value for alt attribute is a text string of
upto 1024 characters including spaces and punctuation. The string must be enclosed in quotation
marks.
Example 2. To display an image with some alternate text.
<html> <head> <title> Image </title>
</head> <body> <hl > Look at the image
</hl><br>
<img src = ''D:\image.jpg" alt ="It is a beautiful flower" >
</body>
</html>
When mouse pointer is moved on the image, the text specified in alt attribute displayed as a
tooltip in Internet Explorer only. If you want to provide a tooltip for other browsers such as Mozilla
Firefox, Google Chrome etc., use title attribute in place of alt attribute, since it is supported in most
of the browsers.
2.Middle Alignment
This alignment is different in both Internet Explorer and Mozilla Firefox. In Internet Explorer, this
alignment aligns the image to the middle of the tallest item in the current line. While in Mozilla
Firefox, this alignment aligns the image to the baseline of the current line in which it is placed.
Example 4. To show middle alignment of an image.
<html>
<head>
<ti tl e> Alignment </title>
</head>
<body>
< h l > Middle Alignment < / h 1 >
<img src="flower2.jpg" align="middle">
A flower, sometimes known as a b'oom or blossom, is the reproductive structure found in
flowering plants. The biological function of a flower is to effect reproduction, usually by providing
a mechanism for the union of sperm with eggs.
</body>
</html>
3. Bottom Alignment
This alignment aligns the bottom edge of the image, to the same horizontal plane as the baseline of
the text. Both Internet Explorer and Mozilla Firefox treat this alignment in the same manner.
Example 5. To show bottom alignment of an image.
<html>
<head> <ti tl e> Alignment </ti tl e> </head> <body>
<hl> Bottom Alignment </hl>
<img src="flower2.jpg" alt="flower" align="bottom">
A flower, sometimes known as a bloom or blossom, is the reproductive structure found in
flowering plants. The biological function of a flower is to effect reproduction, usually by providing
a mechanism for the union of sperm with eggs.
</body>
</html>
4.Left Alignment
This alignment aligns the image to the left on the Web page respectively of the browser
window.
Example 6. To show left alignment of an image.
<html> <head> <tit1e> Alignment </title>
</head> <body>
<h1> Left Alignment </h1 >
<img src="flower2.jpg" align="1eft">.
A flower, sometimes known as a bloom or blossom, is the reproductive structure found in
flowering plants. The biological function of a flower is to effect reproduction, usually by providing
a mechanism for the union of sperm with eggs.
</body>
</html>
5 Right Alignment
This alignment aligns the image to the right on the Web page respectively of the browser
window.
Example 7. To show right alignment of an image.
<html>
<head> <title> Alignment </title> </head> <body>
< h 1 > Right Alignment < / h 1 >
<img src="f1ower2.jpg" align="right">
A flower, sometimes known as a bloom or blossom, is the reproductive structure found in
flowering plants. The biological function of a flower is to effect reproduction, usually by providing
a mechanism for. the union of sperm with eggs.
</body>
</html>
Types of Linking
There are two types of linking in a Web page, which are as follows:
1. External Linking
This leads to a link that go to another Website. In other words, it refers to a different page on a
different Website. When a user click on a hyperlink on a Web page, user is directed on the location,
which is specified in that hyperlink. To create an external link with <a> tag and its href attribute (to
define URL of target document), a title attribute also needed.
The href Attribute
The href stands for Hypertext Reference. The href attribute is used to specify the URL of the target
document. It is used to specify the destination of Web page, which is linked. Notice, the pages on
Internet should give a complete URL, i.e. alongwith http://.
Example 10. To show external linking.
<html> <head> <title> Creating a Hyperlink </1i 11 e> </head>
<body> <hl> Look at the image </hl> <br>
<img src ="D:\images.jpg" alt = "It is a beautiful picture">
<a href = "http://www.google.com"> Click Here < / a > to get more flower images. </body>
</html>
Images as Links
Images can also be used as hyperlinks. To create image as a link, following syntax is used:
Listed Hyperlinks
It is noticeable that <a> tag can also be used for more complex task (as with images or with lists
etc.)
Example 12. To show listed hyperlinks.
<html> <head> <title> List </title> </head>
<body> <hl>List </hl>
<ul>
<li> <a href="linkl.html ">
<img src = ”F:\Fruits-wallpaper-91.jpg" align="middle" height="75" width="75">
Fruit Chart </a></li>
<br><br>
<li> <a href= "link2.html">
<img src="F:\vegetable.jpg" align="middle" width="75" height="75">
Vegetable Chart </a> < /1 i >
</ul> </body> </html>
2. Internal Linking
This is a type of HTML linking that links pages within a single Website, various sections of same
document or different document.
Linking on the Same Web Page
To create an internal link, you need to use a pair of <a> tags. The first <a> tag is used to specify the
name of the target location for identification purpose. It is known as target fragment. You can use
the <a> tag with its name or id attribute to identify a fragment. This type of anchor is commonly
called as named anchor.
The first step is to make the target fragment. The simple syntax to do so is written below:
<a name ="aa"> Part A </a>
Where, “aa” is the name of fragment/segment you want to refer (like top, bottom etc.). The second
<a> tag is used to create a link to the target fragment. The simple syntax to link to the target
segment is written below:
<a href = "#aa"> ClickHere </a>
In the second <a> tag, the value of href attribute with # symbol is to be specified.
Example 14. To show the internal linking in an HTML document.
<html> <head><title>Internal Linking</title></head>
<body> <hl>Linking in a page </hl> <h3>Click here to go to the <a href="#bottom">bottom</a>
of the page.</h3>
<br><br><br><br><br><br><br><br><br><br><br><br> <br><br><br><br><br><br><br>
<a name="bottom"<h3> You are at the bottom of the page.</h3></a> </body> </html>
Significance of Linking
Links on a Web page allow user to jump to another document. It is a very useful feature of HTML
as when you click on a hypertext, it carries you to other document. It enables the Web page writer
to refer to other documents and thus prevent the need of creating large document. e.g. if you are
reading an F,-Book, where many chapters are explained. Now, if you want to read the last chapter
of the book, then by using hyperlink, you can go to that chapter directly without scrolling down to
whole book.
<sub> Tag
The text which is lowered slightly below the baseline to appear below the surrounding text is
known as subscript, e.g. in H2 O, 2 is the subscripted text. In HTML, the <sub> and </sub> tags
turn the enclosed text into subscript. In its simplest form, <sub> tag may be specified as:
<sub> aaa </sub> Where, aaa is the text, which is to be subscripted.
Example 17. To show the use of subscript.
<html> <head><title> Subscripted </ti tl e></head>
<body> < hl> Some Examples of Subscript are </h1 >
<p>H<sub>2</sub>0 - Water </p> <br>
<p>log <sub>2</sub>x</p><br>
<p>CO<sub>2</sub> - CarbonDioxide</p>
</body> </html>
To Create a Table
Here is an example of HTML code for creating a table:
<html> <head> <title> Table </title> </head> <body> <table>
<caption> Name of Students </caption>
<tr>
<td> Sunita</td>
<td> Amita </td>
<td> Ameesha </td>
</tr>
<tr>
<td> Ankita </td>
<td> Prachi </td>
<td> Neha </td>
</tr>
<tr>
<td> Esha </td>
<td> Preeti </td>
<td> Payal </td>
</tr>
</table>
</body>
</html>
In the above code, we used a <table> tag which specifies a table that is to be inserted. After
<table> tag, arrives <caption> tag, this <caption> tag is used to add headline in the table. Here,
the caption is ‘Name of Students’. After <caption> tag, <tr> tag is used which specifies a new
table row. There should be a </tr> tag in the end of each row.
Here, <tr> tag is mentioned three times. This means that three rows are added. The next tag is
<td>, which denotes the data cells. It has been put in front of every piece of information that you
want to add in a cell and <td> tag is mentioned three times in each <tr> tag, i.e. each row will
contain three data cells. At the end, the </table> tag closes a table.
Thus, frame attribute contains 9 types of values that all can be specified for frames.
Example 3. To illustrate the use of frame attribute.
<html> <head><title> Table </title></head> <body>
<table border="2" frame="void"> <tr>
<td> One </td> <td> Two </td> </tr>
<tr>
<td> Three </td> <td> Four</td></tr>
</table><br>
<table border="2" frame="box">
<tr>
<td> One</td> <td> Two</td></tr>
<tr>
<td> Three </td> <td> Four </td></tr>
< /table>
</body>
</html>
Here, it is noticeable that when the width attribute is used with <table> tag, it specifies the width
of the table and when it is used with <td> tag, it specifies the width of the cells in table.
Onclick event is activated when you click the object (table) on which you apply the event.
Specifies which lines or rules to draw <table rules=”none | groups | rows | cols |
rules
between rows and columns. all”>
Provides
summary <table summary=”‘text”>
information about the table.
Attributes of <td> and <th> Tags
Attributes Explanation Syntax
align Used to align the table data. <td|th align= “left|right center”>