Professional Documents
Culture Documents
for Business
Preface:
Chapter 1: Introduction
Chapter 7: Databases
Appendix A: HTML
Table of content
Chapter 7: Databases
7.1 Relational database
7.1.1 One-to-one relation
7.1.2 One-to-many relation
7.1.3 Many-to-many
7.2 Database design
7.3 Database management system (DBMS)
7.4 Creating database in MS Access
Introduction
1.1 Definition of information system
Information system is a collection of software, hardware,
networks, and people to store and manipulate information in
an organization. The aim of the information system is to
automate processes, reduce production cost and support
decision makers.
1.2 Hardware
Hardware means the tangible components of the computer
such as keyboard, mouse, and screen. A wide range of
hardware components can be used in information systems.
Hardware of an information system should have the capability
to achieve the required tasks.
Hardware
Storage devices
Organization management
Reduce production cost
Speed up production process
Electronic marketing
Increase revenues
Seles men
Information systems become essential for sales
department specially after emerging of e-commerce.
Nowadays, most of organizations depend on e-
commerce to sell their products.
Financial people
Financial transactions are done using information
systems. Accounting activities depend on information
systems
Stock advisor
Stock control systems which keep track of existing
items and stock status are a type of information system.
Stock advisors are fully depends on information
systems to control all issues related to stock.
Managers
Managers use information system to follow up the
progress of the organization activity and getting updated
information about everything in the organization.
Moreover, information systems provide data analysis to
managerial levels to support the process of decision
making.
1.5 Information levels
Data can be classified according to the processing has been
done to the data and its value. As shown in figure 1.2, there
are three main levels of data.
Knowledge
Information
Data
Data
E-commerce
System analysis
This activity includes understanding the environment of
the system and determining the requirements of the new
system. This activity should answer the question "what
the desired information system should do?"
System design
This activity groups the required functionalities into
related sets. Each set of requirements belong to a
component of the new system. How these components
interact with each other should be determined in this
phase. The output of this activity is a plan that specifies
what the programmer should do.
System programming
In this activity the programmers start writing code in
specific programming language. This code represents
the instructions that the computer should execute to do
the required functions. This activity may include
creating database to store the system data in an
organized way.
Testing
Testing activity is important to ensure that the
developed system is working in a correct way. The new
information system should work according to users'
requirements. The testing phase is critical because
information systems normally control financial
processes. So the new system should be tested carefully.
Once the system is tested and passes the acceptance test
it is ready to be applied in the real environment.
1.8 Database
Database is the place where the data is stored in an organized
way. An information system should store and process the data
to get valuable information. Databases are located in the core
of information systems.
1.9 Security
In information society, information is the most valuable
resource, so it should be secured. Moreover, Information
systems control very critical activities such as financial
processes or bank transactions so security of the information
system is crucial. An information system should be secured
against any kind of attack. The attack may aim to get valuable
information or changing existing information. Both of these
attacks are very dangerous and may lead to catastrophic
results.
Passive attack
Passive attach aims to get information only. It does not
change or add data. Such attack is dangerous according
to the value of the information the attacker get. For
example if the attacker steels credit cards credential
information belongs to customers of the company, this
leads to very dangerous situation.
Active attack
Active attack aims to update information by deleting,
adding or modifying data. For example if the attacker
get access to database of bank clients, the attack can add
money to some accounts or transfer money from
account to another. It is not only financial issues that
represent a danger. Other fields may represent danger if
the attack occurred.
Consequently keeping the information system secure is very
important. There are different tools to protect an information
system. Depending on the structure of the system and
importance of the data stored the security tools are selected.
2.1 Hardware
One of the main components of any information system is
hardware. Hardware is the set of all devices that used in the
information system such as computers, printers, scanners,
storage devices, and tablets. Hardware devices can be
classified into input devices, output devices, storage devices,
and processing units. The following subsections explain each
category of these classes.
The main function of input devices is to enter the data into the
storage media of a computer. There are different types of data
such as text, sound, image, and video. For each type of data
there are special input devices. For example, keyboard is used
to enter text data and mic is used to enter sound data. The
following table explains some common input devices.
Input Description Photo
device
Keyboard Keyboard is the most
common and very
popular input device
which helps to input data
to the computer
Mouse Mouse is the most
popular pointing device.
2.1.4 Servers
Memory Management
Processor Management
Device Management
File Management
Security
Control over system performance
Job accounting
Error detecting aids
Coordination between other software and users
Memory Management
Memory management refers to management of primary
memory or main memory. Main memory is a large array of
words or bytes where each word or byte has its own address.
Processor Management
In multiprogramming environment, the OS decides which
process (task) gets the processor when and for how much
time. This function is called process scheduling. An operating
system does the following activities for processor
management:
Keeps tracks of processor and status of process. The
program responsible for this task is known as traffic
controller.
Allocates the processor (CPU) to a process.
De-allocates processor when a process is no longer
required.
Device Management
An Operating System manages device communication via
their respective drivers. It does the following activities for
device management:
File Management
A file system is normally organized into directories for easy
navigation and usage. These directories may contain files and
other directions.
Network nodes
Wi-Fi
Wi-Fi is a technology that takes an Internet signal and
converts it into radio waves. These radio waves can be picked
up within a radius of approximately 65 feet by devices with a
wireless adapter. Several Wi-Fi specifications have been
developed over the years, starting with 802.11b (1999),
followed by the 802.11g specification in 2003 and 802.11n in
2009. Each new specification improved the speed and range of
Wi-Fi, allowing for more uses. One of the primary places
where Wi-Fi is being used is in the home. Home users are
purchasing Wi-Fi routers, connecting them to their broadband
connections, and then connecting multiple devices via Wi-Fi.
Mobile Network
As the cellphone has evolved into the smartphone, the desire
for Internet access on these devices has led to data networks
being included as part of the mobile phone network. While
Internet connections were technically available earlier, it was
really with the release of the 3G networks in 2001 (2002 in the
US) that smartphones and other cellular devices could access
data from the Internet. This new capability drove the market
for new and more powerful smartphones, such as the iPhone,
introduced in 2007. In 2011, wireless carriers began offering
4G data speeds, giving the cellular networks the same speeds
that customers were used to getting via their home connection.
Why Doesn’t My Cellphone Work When I Travel Abroad?
As mobile phone technologies have evolved, providers in
different countries have chosen different communication
standards for their mobile phone networks. In the US, both of
the two competing standards
exist: GSM (used by AT&T and T-Mobile) and CDMA (used
by the other major carriers). Each standard has its pros and
cons, but the bottom line is that phones using one standard
cannot easily switch to the other. In the US, this is not a big
deal because mobile networks exist to support both standards.
But when you travel to other countries, you will find that most
of them use GSM networks, with the one big exception being
Japan, which has standardized on CDMA. It is possible for a
mobile phone using one type of network to switch to the other
type of network by switching out the SIM card, which
controls your access to the mobile network. However, this will
not work in all cases. If you are traveling abroad, it is always
best to consult with your mobile provider to determine the
best way to access a mobile network.
Bluetooth
While Bluetooth is not generally used to connect a device to
the Internet, it is an important wireless technology that has
enabled many functionalities that are used every day. When
created in 1994 by Ericsson, it was intended to replace wired
connections between devices. Today, it is the standard method
for connecting nearby devices wirelessly. Bluetooth has a
range of approximately 300 feet and consumes very little
power, making it an excellent choice for a variety of purposes.
Some applications of Bluetooth include: connecting a printer
to a personal computer, connecting a mobile phone and
headset, connecting a wireless keyboard and mouse to a
computer, and connecting a remote for a presentation made on
a personal computer.
VoIP
A growing class of data being transferred over the Internet is
voice data. A protocol called voice over IP, or VoIP, enables
sounds to be converted to a digital format for transmission
over the Internet and then recreated at the other end. By using
many existing technologies and software, voice
communication over the Internet is now available to anyone
with a browser (think Skype, Google Hangouts). Beyond this,
many companies are now offering VoIP-based telephone
service for business and home use.
3.3 The Growth of Broadband
In the early days of the Internet, most access was done via a
modem over an analog telephone line. A modem (short for
“modulator-demodulator”) was connected to the incoming
phone line and a computer in order to connect you to a
network. Speeds were measured in bits-per-second (bps), with
speeds growing from 1200 bps to 56,000 bps over the years.
Connection to the Internet via these modems is called dialup
access. Dial-up was very inconvenient because it tied up the
phone line. As the web became more and more interactive,
dial-up also hindered usage, as users wanted to transfer more
and more data. As a point of reference, downloading a typical
3.5 mb song would take 24 minutes at 1200 bps and 2 minutes
at 28,800 bps.
A broadband connection is defined as one that has speeds of
at least 256,000 bps, though most connections today are much
faster, measured in millions of bits per second (megabits or
mbps) or even billions (gigabits). For the home user, a
broadband connection is usually accomplished via the cable
television lines or phone lines (DSL). Both cable and DSL
have similar prices and speeds, though each individual may
find that one is better than the other for their specific area.
Speeds for cable and DSL can vary during different times of
the day or week, depending upon how much data traffic is
being used. In more remote areas, where cable and phone
companies do not provide access, home Internet connections
can be made via satellite. The average home broadband speed
is anywhere between 3 mbps and 30 mbps.
At 10 mbps, downloading a typical 3.5 mb song would take
less than a second. For businesses who require more
bandwidth and reliability, telecommunications companies can
provide other options, such as T1 and T3 lines.
Broadband access is important because it impacts how the
Internet is used. When a community has access
to broadband, it allows them to interact more online and
increases the usage of digital tools overall. Access
to broadband is now considered a basic human right. It is vital
that no one be excluded from the new global knowledge
societies we are building. We believe that communication is
not just a human need – it is a right.
3.4 Organizational Networking
LAN and WAN
While the Internet was evolving and creating a way for
organizations to connect to each other and the world, another
revolution was taking place inside organizations. The
proliferation of personal computers inside organizations led to
the need to share resources such as printers, scanners, and
data. Organizations solved this problem through the creation
of local area networks (LANs), which allowed computers to
connect to each other and to peripherals. These same networks
also allowed personal computers to hook up to legacy
mainframe computers.
An LAN is (by definition) a local network, usually operating
in the same building or on the same campus. When an
organization needed to provide a network over a wider area
(with locations in different cities or states, for example), they
would build a wide area network (WAN).
Client-Server
The personal computer originally was used as a stand-alone
computing device. A program was installed on the computer
and then used to do word processing or number crunching.
However, with the advent of networking and local area
networks, computers could work together to solve problems.
Higher-end computers were installed as servers, and users on
the local network could run applications and share information
among departments and organizations. This is called client-
server computing.
Intranet
Just as organizations set up web sites to provide global access
to information about their business, they also set up internal
web pages to provide information about the organization to
the employees. This internal set of web pages is called an
intranet. Web pages on the intranet are not accessible to those
outside the company; in fact, those pages would come up as
“not found” if an employee tried to access them from
outside the company’s network.
Extranet
Sometimes an organization wants to be able to collaborate
with its customers or suppliers while at the same time
maintaining the security of being inside its own network. In
cases like this a company may want to create an extranet,
which is a part of the company’s network that can be made
available securely to those outside of the company. Extranets
can be used to allow customers to log in and check the status
of their orders, or for suppliers to check their customers’
inventory levels.
Sometimes, an organization will need to allow someone who
is not located physically within its internal network to gain
access. This access can be provided by a virtual private
network (VPN).
The field of data center design has been growing for decades
in various directions, including new construction big and
small along with the creative re-use of existing facilities.
High availability
Various metrics exist for measuring the data-availability that
results from data-center availability beyond 95% uptime, with
the top of the scale counting how many "nines" can be placed
after "99%".
Environmental control
Temperature and humidity are controlled via:
Air conditioning
Indirect cooling, such as using outside air, Indirect
Evaporative Cooling (IDEC) units, and also using sea
water.
Electrical power
Aisle containment
Fire protection
Security
Analysis of Information
System
System development has four main phases: System analysis,
system design, system development, and maintenance. This
chapter focuses on explaining the first phase of system
development. The main objective of system analysis is to
understand the system details and what actually the system
should provide.
Analysis
Evolution Design
Implementation
Data gathering
Requirements definition
Requirements prioritizing
Prototyping
Validation
Documentation
Functional requirements
Non-functional requirements
- ....
- The student can use the system to print a report
about his registered courses. The report appears in
tabular form that contains 6 columns (course code,
course name, credits of the course, course professor,
time of lecture, time for laboratory)
- ....
- ....
used in managerial level. However, system requirements have
more technical details and directed to developers. It is very
helpful to make the developed application provides what users
need.
4.5 Requirements prioritization
Normally, big information systems have hundred or thousand
of requirements. It is difficult to implement all the
requirements due to limited budget, resources, or technology.
Consequently, prioritizing requirements is an important
activity in which the requirements sorted according to its
importance. Moreover, ordering the requirements helps to
divide implementation into iterations.
Self-study
Architecture design
High-level Design
Detailed Design
Advantage of modularization:
1. Abstraction
Abstraction is the process or result of generalization by
reducing the information content of a concept or an
observable phenomenon, typically in order to retain
only information which is relevant for a particular
purpose. It is an act of Representing essential features
without including the background details or
explanations.
2. Refinement
It is the process of elaboration. A hierarchy is
developed by decomposing a macroscopic statement of
function in a step-wise fashion until programming
language statements are reached. In each step, one or
several instructions of a given program are decomposed
into more detailed instructions. Abstraction and
Refinement are complementary concepts.
3. Modularity
Software architecture is divided into components called
modules.
4. Software Architecture
It refers to the overall structure of the software and the
ways in which that structure provides conceptual
integrity for a system. Good software architecture will
yield a good return on investment with respect to the
desired outcome of the project, e.g. in terms of
performance, quality, schedule and cost.
5. Structural Partitioning
The program structure can be divided into both
horizontally and vertically. Horizontal partitions define
separate branches of modular hierarchy for each major
program function. Vertical partitioning suggests that
control and work should be distributed top down in the
program structure.
6. Data Structure
It is a representation of the logical relationship among
individual elements of data.
7. Software Procedure
It focuses on the processing of each module
individually.
8. Information Hiding
Modules should be specified and designed so that
information contained within a module is inaccessible
to other modules that have no need for such
information.
5.5 Information system design considerations
Compatibility
The software is able to operate with other products that are
designed for interoperability with another product. For
example, a piece of software may be backward-compatible
with an older version of itself.
Extensibility
New capabilities can be added to the software without
major changes to the underlying architecture.
Modularity
The resulting software comprises well defined,
independent components which leads to better
maintainability. The components could be then
implemented and tested in isolation before being
integrated to form a desired software system. This allows
division of work in a software development project.
Fault-tolerance
The software is resistant to and able to recover from
component failure.
Maintainability
A measure of how easily bug fixes or functional
modifications can be accomplished. High maintainability
can be the product of modularity and extensibility.
Reusability
The ability to use some or all of the aspects of the pre-
existing software in other projects with little to no
modification.
Robustness
The software is able to operate under stress or tolerate
unpredictable or invalid input. For example, it can be
designed with resilience to low memory conditions.
Security
The software is able to withstand and resist hostile acts and
influences.
Usability
The software user interface must be usable for its target
user/audience. Default values for the parameters must be
chosen so that they are a good choice for the majority of
the users.
Performance
The software performs its tasks within a time-frame that is
acceptable for the user, and does not require too much
memory.
Portability
The software should be usable across a number of different
conditions and environments.
Scalability
The software adapts well to increasing data or added
features or number of users.
5.6 Architecture and design patterns
Advantages
Layers make standardization easier as developers can
clearly define different layers
Each layer can focus solely on its role. This makes it
maintainable, testable, easy to assign separate roles, and
easy to update layers separately
Changes can be made within a layer without affecting
other layers
Most developers are familiar with this architecture
pattern
Provides an easy way of writing a well-organized and
testable application
Once the tasks and layers have been defined, the layers
can be easily separated and assigned to different
programmers
Disadvantages
Not universally applicable to all software solutions
Certain layers may have to be skipped in certain
situations, creating unnecessary code and increasing the
complexity of layer interaction
Tends to lead to a monolithic application that is hard to
split up afterward
Developers often find themselves writing a lot of code
to pass through the different layers without adding any
value to the layers. As a result the layering pattern can
be overkill for some software applications
Can be costly to design and built all the layers
Advantages
Good for startups who want to model a set of services
where clients can request them
Having a set of shared resources and services makes it
easier to manage, modify, and reuse software modules
within a system as they are stored in one common
location
Disadvantages
Increased overhead since many clients have different
ways they want to view the shared resources and
services
Shared server is often a performance bottleneck as it
can be serving several clients at the same time, likewise
it can be a single point of failure
Making the decision as to locate the system’s
functionality in the client or server component can be
costly and hard to change if the system has already been
built
Chapter 6
Server
The Internet
Client
Client Client
Programming language:
10100101 00101101
11110101 10001010
01111010 10011101
11000111 00010011
…
Figure 6.2 binary code
job.
Program
in high Machine
level Compiler code
language
Student
name
address
GPA
phone
courses
enroll(course)
calculate_GPA()
get_data()
Std1 Std2
Mohamed Ali Hassan Omer
12 Tahrir st 43 Horria st, Assiut
3.4 3.7
02-36985858 088-7412583
[math accounting OS] [math accounting IS]
Person
name
phone
address
Student Employee
level department
GPA salary
Graduate_Student
thesis_title
supervisor
Databases
Database is a collection of data in an organized store. This
data is related and can be retrieved easily. Database is
considered a main component in information systems. Most of
information systems contain a database. It is the part of
information system that keeps the data in a way that enables
other parts to use the data and get valuable information.
DB
Programs
Name
Total
credits
Head name
Employee_ID Salary
21 4560
26 3500
37 4100
22 3900
39 5475
Table 3
7.1.3 Many-to-many
Students Courses
Name Name
Address Code
Phone Credits
GPA
Program
Database design contains also the foreign key fields that used
to relate different tables. In database design phase the design
may use entity relationship diagram (ERD). ERD is structured
diagram to visualized design of a database. It contains entities
and relations between these entities. Figure 7.4 shows a part of
ERD for students database.
student_ID
Course_co
name
de
n n
address Students Courses name
phone credits
GPA
Open MS Access
Click file menu and choose new
Choose blank database
Figure 7.5
From create tab choose table. You will find a new table is
added in the left side
Right click on the new table and choose design view. You
will be asked to enter name of the table.
Figure 7.6
Figure 7.7
To determine the primary key field, select the first field
(student_ID) right click and select primary key from the
pop up menu. You will find key symbol beside the field
name as shown in figure 7.7
Figure 7.8
Figure 7.9
Now you create a table and enter data in this table. Let us
make a SQL query to retrieve some data.
Data warehouse
Part III: Using
Information Systems in
Business
Chapter 8
Business Automation
We have all heard the term process before, but what exactly
does it mean? A process is a series of tasks that are completed
in order to accomplish a goal. A business process, therefore, is
a process that is focused on achieving a goal for a business. If
you have worked in a business setting, you have participated
in a business process. Anything from a simple process for
making a sandwich at Subway to building a space shuttle
utilizes one or more business processes.
1. Go to ebay.com.
2. Click on “register.”
3. Enter your contact information in the “Tell us about
you” box.
4. Choose your user ID and password.
5. Agree to User Agreement and Privacy Policy by
clicking on “Submit.”
For processes that are not so straightforward, documenting the
process as a checklist may not be sufficient. For example, here
is the process for determining if an article for a term needs to
be added to Wikipedia:
This has been one of the criticisms of ERP systems: that they
commoditize business processes, driving all businesses to use the
same processes and thereby lose their uniqueness. The good news
is that ERP systems also have the capability to be configured with
custom processes. For organizations that want to continue using
their own processes or even design new ones, ERP systems offer
ways to support this through the use of customizations.
changes and will also require retesting the system every time an
upgrade is made. Organizations will have to wrestle with this
decision: When should they go ahead and accept the best-practice
processes built into the ERP system and when should they spend
the resources to develop their own processes? It makes the most
sense to only customize those processes that are critical to the
competitive advantage of the company. Some of the best-known
ERP vendors are SAP, Microsoft, and Oracle.
8.4 Business Process Management
Organizations that are serious about improving their business
processes will also create structures to manage those
processes. Business process management (BPM) can be
thought of as an intentional effort to plan, document,
implement, and distribute an organization’s business
processes with the support of information technology.
Chapter 9
Impact of Information
Systems on Business
Recently, Information technology has been used widely in
almost all fields. It makes a great success everywhere. For
example applications of information technology are used in
medical field to help in diagnosing different diseases.
Moreover, automation of medical devices is also depends on
information technology. On the other hand, using Artificial
Intelligence (AI) applications and robotics makes revulsion in
different fields. Nowadays, cars are controlled by a computer
system without a driver. Full autonomous cars soon will be in
the streets. Generally information technology improves
quality of life and makes life easier. Using mobile applications
people can control their homes remotely from work.
10.3.1 Authentication
At least 8 characters
Contains at least one symbol
Contains at least one upper case letter
Contains numbers
Not include user name
Not include birth date of the user
Key
Encryption
How does encryption work?
Key
Decryption
When you want to encrypt the letter d and the key is 1 the
result letter will be e. Adding the key (1) to the letter z will
result the letter a according to the circular list of English letter
(figure ??).
“A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U,
V, W, X, Y, Z”
y–3=v
o–3=l
u–3=r
The resulted cypher text is “vlr”. In the decryption process for
each letter add the key to the letter to obtain original text as
follow:
u v
s t w
r x
q y
p z
o
n
m a
l b
k c
j d
i h g f e
v+3=y
l+3=o
r+3=u
Example: if you a receiver and you get an encrypted message
“Nzxpmdot dn dhkjmovio” use the above decryption method
with key = 5 to obtain the plain text. You will find that the
original message is “Security is important”.
10.3.4 Firewalls
10.3.5 Backup
Taking a copy from the important data and storing the new
copy in a save place is called backup. The backup can be used
in case of damage in the original data. It is an important issue
to have regular backups from the system. Sometimes attackers
damage the original data or lock it and prevent accessing to it.
In such case backup can solve the problem. Moreover, backup
can be used in case of natural disasters or unintended failure.
Backup plan
Password restrictions
Employee guidelines
Protection layers
Chapter 11
1) Confidentiality
Confidentiality of information is very important to all
information-using professions.
2) Programmers and ethics
Sometimes programmers are asked to make a program
that is not ethically good. For example, the programs
that crack passwords are illegal and not ethically.
3) Social responsibility of systems analysts: An analyst's
job is to design work flows that are successful. The
analyst should work in an ethical way.
maintain competence
disclose issue of interest, and
maintain confidentiality of information even after
occupation ends.
11.3.1 Management Information Systems and Ethics
11.6.1 Copyright
License Description
Under this license the owner may put his own restrictions for
redistribution or selling. If software is under freeware license
you can get and use for free. Other things like modification
and selling depend on the owner.
Copyleft license
Proprietary license
Noncommercial license
HTML
HTML stands for Hypertext Markup Language, and it is the
most widely used language to write Web Pages.
To create a web page you should write the code of the page
using html language. When you open the created web page,
the web browser read the code and show the correspondence
html page
Now, HTML is being widely used to format web pages with
the help of different tags available in HTML language.
HTML Tags
As told earlier, HTML is a markup language and makes use
of various tags to format the content. These tags are enclosed
within angle braces <Tag Name>. Except few tags, most of
the tags have their corresponding closing tags. For
example, <html> has its closing tag </html> and <body> tag
has its closing tag </body> tag etc.
Above example of HTML document uses the following tags −
1 <!DOCTYPE...>
This tag defines the document type and HTML version.
2 <html>
This tag encloses the complete HTML document and mainly
comprises of document header which is represented by
<head>...</head> and document body which is represented by
<body>...</body> tags.
3 <head>
This tag represents the document's header which can keep other
HTML tags like <title>, <link> etc.
4 <title>
The <title> tag is used inside the <head> tag to mention the
document title.
5 <body>
This tag represents the document's body which keeps other
HTML tags like <h1>, <div>, <p> etc.
6 <h1>
This tag represents the heading.
7 <p>
This tag represents a paragraph.
<html>
<head>
Document header related tags
</head>
<body>
Document body related tags
</body>
</html>
We will study all the header and body tags in subsequent
sections, but for now let's see what is document declaration
tag.
<!DOCTYPE html>
Example
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Heading Example</title>
</head>
<body>
<h1>This is heading 1</h1>
<h2>This is heading 2</h2>
<h3>This is heading 3</h3>
<h4>This is heading 4</h4>
<h5>This is heading 5</h5>
<h6>This is heading 6</h6>
</body>
</html>
Example
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Paragraph Example</title>
</head>
<body>
<p>Here is a first paragraph of text.</p>
<p>Here is a second paragraph of text.</p>
<p>Here is a third paragraph of text.</p>
</body>
</html>
The <br /> tag has a space between the characters br and the
forward slash. If you omit this space, older browsers will
have trouble rendering the line break, while if you miss the
forward slash character and just use <br> it is not valid in
XHTML.
Example
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Line Break Example</title>
</head>
<body>
<p>Hello<br />
You delivered your assignment ontime.<br />
Thanks<br />
Mahnaz</p>
</body>
</html>
Centering Content
You can use <center> tag to put any content in the center of
the page or any table cell.
Example
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Centring Content Example</title>
</head>
<body>
<p>This text is not in the center.</p>
<center>
<p>This text is in the center.</p>
</center>
</body>
</html>
This will produce following result –
Horizontal Lines
Horizontal lines are used to visually break-up sections of a
document. The <hr> tag creates a line from the current
position in the document to the right margin and breaks the
line accordingly.
Example
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Horizontal Line Example</title>
</head>
<body>
<p>This is paragraph one and should be on top</p>
<hr />
<p>This is paragraph two and should be at bottom</p>
</body>
</html>
The <hr /> element has a space between the characters hr and
the forward slash. If you omit this space, older browsers will
have trouble rendering the horizontal line, while if you miss
the forward slash character and just use <hr> it is not valid in
XHTML
Nonbreaking Spaces
Suppose you want to use the phrase "12 Angry Men." Here,
you would not want a browser to split the "12, Angry" and
"Men" across two lines −
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Nonbreaking Spaces Example</title>
</head>
<body>
<p>An example of this technique appears in the movie
"12 Angry Men."</p>
</body>
</html>
HTML - Elements
An HTML element is defined by a starting tag. If the element
contains other content, it ends with a closing tag, where the
element name is preceded by a forward slash as shown below
with few tags −
<br />
Example
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Nested Elements Example</title>
</head>
<body>
<h1>This is <i>italic</i> heading</h1>
<p>This is <u>underlined</u> paragraph</p>
</body>
</html>
This will display the following result −
HTML - Attributes
We have seen few HTML tags and their usage like heading
tags <h1>, <h2>, paragraph tag <p> and other tags. We used
them so far in their simplest form, but most of the HTML
tags can also have attributes, which are extra bits of
information.
Example
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Align Attribute Example</title>
</head>
<body>
<p align = "left">This is left aligned</p>
<p align = "center">This is center aligned</p>
<p align = "right">This is right aligned</p>
</body>
</html>
This will display the following result −
Core Attributes
The four core attributes that can be used on the majority of
HTML elements (although not all) are −
Id
Title
Class
Style
The Id Attribute
Example
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>The title Attribute Example</title>
</head>
<body>
<h3 title = "Hello HTML!">Titled Heading Tag Example</h3>
</body>
</html>
<head>
<title>The style Attribute</title>
</head>
<body>
<p style = "font-family:arial; color:#FF0000;">Some text...</p>
</body>
</html>
dir
lang
xml:lang
Value Meaning
Example
Live Demo
<!DOCTYPE html>
<html dir = "rtl">
<head>
<title>Display Directions</title>
</head>
<body>
This is how IE 5 renders right-to-left directed text.
</body>
</html>
<head>
<title>English Language Page</title>
</head>
<body>
This page is using English Language
</body>
</html>
Generic Attributes
Here's a table of some other attributes that are readily usable
with many of the HTML tags.
Bold Text
Anything that appears within <b>...</b> element, is
displayed in bold as shown below −
Example
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Bold Text Example</title>
</head>
<body>
<p>The following word uses a <b>bold</b> typeface.</p>
</body>
</html>
Italic Text
Anything that appears within <i>...</i> element is displayed in
italicized
Underlined Text
Anything that appears within <u>...</u> element, is displayed
with underline
Strike Text
Anything that appears within <strike>...</strike> element is
displayed with strikethrough, which is a thin line through the
text as shown below
Example
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Strike Text Example</title>
</head>
<body>
<p>The following word uses a <strike>strikethrough</strike>
typeface.</p>
</body>
</html>
This will produce the following result −
Superscript Text
The content of a <sup>...</sup> element is written in
superscript; the font size used is the same size as the
characters surrounding it but is displayed half a character's
height above the other characters.
Example
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Superscript Text Example</title>
</head>
<body>
<p>The following word uses a <sup>superscript</sup> typeface.</p>
</body>
</html>
Subscript Text
The content of a <sub>...</sub> element is written in
subscript; the font size used is the same as the characters
surrounding it, but is displayed half a character's height
beneath the other characters.
Example
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Subscript Text Example</title>
</head>
<body>
<p>The following word uses a <sub>subscript</sub> typeface.</p>
</body>
</html>
Inserted Text
Anything that appears within <ins>...</ins> element is
displayed as inserted text.
Deleted Text
Anything that appears within <del>...</del> element, is
displayed as deleted text.
Larger Text
The content of the <big>...</big> element is displayed one
font size larger than the rest of the text surrounding it as
shown below −
Example
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Larger Text Example</title>
</head>
<body>
<p>The following word uses a <big>big</big> typeface.</p>
</body>
</html>
Smaller Text
The content of the <small>...</small> element is displayed
one font size smaller than the rest of the text surrounding it as
shown below −
Insert Image
Images are very important to beautify as well as to depict
many complex concepts in simple way on your web page.
This tutorial will take you through simple steps to use images
in your web pages.
Example
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Using Image in Webpage</title>
</head>
<body>
<p>Simple Image Insert</p>
<img src = "/html/images/test.png" alt =
"Test Image" />
</body>
</html>
This will produce the following result –
You can use PNG, JPEG or GIF image file based on your
comfort but make sure you specify correct image file name
in src attribute. Image name is always case sensitive.
Example
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Using Image in Webpage</title>
</head>
<body>
<p>Simple Image Insert</p>
<img src = "/html/images/test.png" alt =
"Test Image" />
</body>
</html>
Example
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Set Image Width and Height</title>
</head>
<body>
<p>Setting image width and height</p>
<img src = "/html/images/test.png" alt =
"Test Image" width = "150" height = "100"/>
</body>
</html>
Example
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Set Image Border</title>
</head>
<body>
<p>Setting image Border</p>
<img src = "/html/images/test.png" alt =
"Test Image" border = "3"/>
</body>
</html>
Set Image Alignment
By default, image will align at the left side of the page, but
you can use align attribute to set it in the center or right.
Example
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Set Image Alignment</title>
</head>
<body>
<p>Setting image Alignment</p>
<img src = "/html/images/test.png" alt =
"Test Image" border = "3" align = "right"/>
</body>
</html>
Linking Documents
A webpage can contain various links that take you directly to
other pages and even specific parts of a given page. These
links are known as hyperlinks.
Example
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Hyperlink Example</title>
</head>
<body>
<p>Click following link</p>
<a href = "https://www.google.com" target =
"_self">Search in Google</a>
</body>
</html>
This will produce the following result
1 _blank
Opens the linked document in a new window or tab.
2 _self
Opens the linked document in the same frame.
3 _parent
Opens the linked document in the parent frame.
4 _top
Opens the linked document in the full body of the
window.
5 targetframe
Opens the linked document in a named targetframe.
Example
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Hyperlink Example</title>
<base href = "https://www.google.com/">
</head>
<body>
<p>Click any of the following links</p>
<a href = "/html/index.htm" target =
"_blank">Opens in New</a> |
<a href = "/html/index.htm" target =
"_self">Opens in Self</a> |
<a href = "/html/index.htm" target =
"_parent">Opens in Parent</a> |
<a href = "/html/index.htm" target =
"_top">Opens in Body</a>
</body>
</html>
This will produce the following result, where you can click
on different links to understand the difference between
various options given for target attribute.
Use of Base Path
Example
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Hyperlink Example</title>
<base href = "https://www.mysite.com/">
</head>
<body>
<p>Click following link</p>
<a href = "/html/index.htm" target =
"_blank">HTML Tutorial</a>
</body>
</html>
This will produce the following result, where you can click
on the link generated HTML Tutorial to reach to the HTML
tutorial.
Now given URL <a href = "/html/index.htm" is being
considered as:
<ahref = "http://www.mysite.com/html/index.htm"
First create a link to the place where you want to reach with-
in a webpage and name it using <a...> tag as follows −
This will produce following link, where you can click on the
link generated Go to the Top to reach to the top of the HTML
Text.
Go to the Top
Setting Link Colors
You can set colors of your links, active links and visited links
using link, alink and vlink attributes of <body> tag.
Example
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Hyperlink Example</title>
<base href = "https://www.mysite.com/">
</head>
</html>
This will produce the following result. Just check color of the
link before clicking on it, next check its color when you
activate it and when the link has been visited.
Download Links
You can create text link to make your PDF, or DOC or ZIP
files downloadable. This is very simple; you just need to give
complete URL of the downloadable file as follows −
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>Hyperlink Example</title>
</head>
<body>
<a href =
"https://www.mysite.com/page.pdf">Download PDF
File</a>
</body>
</html>
1 width
This specifies the width of the marquee. This can be a
value like 10 or 20% etc.
2 height
This specifies the height of the marquee. This can be a
value like 10 or 20% etc.
3 direction
This specifies the direction in which marquee should
scroll. This can be a value like up, down, left or right.
4 behavior
This specifies the type of scrolling of the marquee.
This can have a value like scroll, slide and alternate.
5 scrolldelay
This specifies how long to delay between each jump.
This will have a value like 10 etc.
6 scrollamount
This specifies the speed of marquee text. This can
have a value like 10 etc.
7 loop
This specifies how many times to loop. The default
value is INFINITE, which means that the marquee
loops endlessly.
8 bgcolor
This specifies background color in terms of color name
or color hex value.
9 hspace
This specifies horizontal space around the marquee.
This can be a value like 10 or 20% etc.
10 vspace
This specifies vertical space around the marquee. This
can be a value like 10 or 20% etc.
Examples - 1
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>HTML marquee Tag</title>
</head>
<body>
<marquee>This is basic example of
marquee</marquee>
</body>
</html>
Examples - 2
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>HTML marquee Tag</title>
</head>
<body>
<marquee width = "50%">This example will
take only 50% width</marquee>
</body>
</html>
Examples - 3
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>HTML marquee Tag</title>
</head>
<body>
<marquee direction = "right">This text will
scroll from left to right</marquee>
</body>
</html>
Examples - 4
Live Demo
<!DOCTYPE html>
<html>
<head>
<title>HTML marquee Tag</title>
</head>
<body>
<marquee direction = "up">This text will
scroll from bottom to up</marquee>
</body>
</html>