Web Chapter 1
Web Chapter 1
WEB TECHNOLOGIES
Asst.Prof. Gururaj N.Kulkarni
2024
WEB TECHNOLOGIES
ORIGINS:
• In the 1960 the US Department of Defense (DoD) became interested in developing a new large
scale computer network in the 1960.
• The purposes of this network were communications, program sharing and remote computer
access for researchers working on defense related contracts.
• The DoD Advanced Research Projects Agency (ARPA) funded the construction of the first such
network, which connected about a dozen ARPA funded research laboratories and university.
• The first node of this network was established at |UCLA in 1969. Because it was funded by
ARPA, the network was named ARPAnet.
• The primary use of ARPAnet was simple text based communications through E-mail , because
ARPAnet was available only to laboratories and universities that conducted ARPA funded
research.
• Other networks were developed during the late 1970 and early 1980 with BITNET and CSNET
among them.
• BITNET, which is an acronym for because it’s Time Network, begun at the city University of New
York. It was built initially to provide electronics e-mail and file transfer.
• CSNET, which is an acronym for Computer Science Network, connected the University of
Delaware, University of Wisconsin.
• The innovation that allows all of these diverse devices to communicate with each other is a
single.
• Low level protocol, the Transmission Control Protocol/ Internet Protocol (TCP/IP).
• TCP/IP became the standard for computer network connection in 1982 and it can be used
directly to allow a program on one computer to communicate with a program on another
computer via the internet.
• TCP/IP provides the low level interface that allows all computers (and other device) connected
to the internet to appear exactly the same.
• Rather than connecting every computer on the internet directly to every other computer on the
internet, normally the individual computers in an organization are connected to each other in
local network.
• Internet nodes are identified by names, for computers, they are identified by numeric
addresses.
• This exactly parallels the relationship between a variable name in program which is for people
and the variables numeric memory address, which is for machine.
• The Internet Protocol (IP) address of a machine connected to the internet is a unique 32 bit
number.
• IP addresses usually are written as four 8 bit numbers, separated by periods. The four routing
computers to decide where a message must go next to get to its destination.
• For example , a small organization may be assigned 256 IP address , such as 191.57.126.0 to
191.57.126.255
• Next to developed the most significant to expand the address size from 32 bit to 128 bit.
DOMAIN NAMES:
• People have difficulty dealing with and remembering numbers, machine on the internet also
have textual names.
• These names begin with the name of the host machine, followed by progressively larger
enclosing collection of machine called domains.
• The first domain name, which appears immediately to the right of the host name, is the domain
of which the host is a part.
• Second domain name gives the domain of which the first domain is a part organization in which
the host resides, which is largest domain in the sites name.
• http://msoft.com/index.html
• Second part specifies the IP address or domain name where the resource is located.
• The above URL specifies a web page to be fetched using the HTTP protocol.
• In 1989 a small group of people led by Tim Berners-Lee at CERN or European Laboratory for
particle Physics proposed a new protocol for the Internet as well as a system of document
access to use it.
• The intent of this new system, which the group named the World Wide Web, to allow users to
use the internet to exchange document describing their work. (limited group in placed around
the world)
• The proposed new system was designed to allow a user anywhere on the internet to search for
and retrieve documents from database an any number of different document serving
computers.
• For the form of its documents, the system used hypertext, which is text with embedded links to
text in other document to allow non sequential browsing of textual material.
• Documents are sometimes just text usually with embedded links to other documents, but they
often also include images, sound recording or other kinds of media.
WEB BROWSERS:
• When two computers communicate over some network, in many cases one acts as a client and
other as a server.
• The client initiates the communication, which is often a request for information stored on the
server, which sends that information back to the client.
• The web as well as many other systems, operates in this client/server configuration.
• Documents provided by sever on the web are requested by browsers which are programs
running on client machine. They are called browsers.
• Because they allow the users to browse the resource available on server.
• The first browsers were text based they were not capable of displaying any sort of graphic
information nor did they have a graphical user interface.
• By late 1993, version of Mosaic for Apple Macintosh and Microsoft Window system had been
released, to support graphical user interface.
• In the simplest case, a browser requests a static document from a server. The server locates the
document and sends it to the browser, which displays it for the user.
WEB SERVERS:
• Web servers are programs that provide documents to requesting browsers. The server are slave
programs, they are only when request are made to them by browser running on other
computers on the internet.
• The most commonly used web servers are Apache, which has been implemented for a variety of
computer platforms and Microsoft Internet Information Server (IIS) which runs under Windows
operating system.
• Web browsers initiate network communications with server by sending them URL.
• A URL can specify one of two different things, the address of a data file stored on the server that
is to be sent to the client, or a program returned to the client.
• All the communications between a web client and a web server use the standard web protocol ,
Hypertext Transfer Protocol (HTTP)
• When a web server begins executing it informs the operating system under which it is running
that it is now ready to accept incoming network connections through a specific port on the
machine.
• While in this running state, the server runs as a background process in the operating system
environment.
• A web client or browser, opens a network connection to a web server, sends information
request and possibly data to the server, and receives information from the server and close the
connection.
• The file structure of a web server has two separate directories. The root of one this is called the
document root.
• The file hierarchy that grows from the document root stores the web document to which the
server has direct access and normally serves to clients.
• The root of the other directory is called the server root. This directory, along with its descendant
directories, stores the server and its support software.
• The files stored directly in the document root are those available to clients do not access the
document root directly in URL rather, the server maps requested URL to the document root,
whose location is not known to client.
• Many servers allow part of the servable document collection to be stored outside the directory
at the document root
• The secondary areas from which document can be served are called virtual document trees.
• Some servers can serve documents that are in the document root of other machine on the web ,
in this case they are called proxy server.(Proxy servers help improve web performance by
storing a copy of frequently used WebPages.)
APACHE:
• The name Apache has nothing to do with the Native American tribe of the same name.
• Rather it came from the nature of its first version, which was a patchy version of the http server.
• The primary reasons for this are as follows, it is an excellent server because it’s both fast and
reliable.
• Furthermore, it is open source software, which means it is free and managed by a large team of
volunteers, a process that efficiently and effectively maintains the system.
• Windows based web server use IIS. Apache and IIS provide similar varieties of services.
• From point of view of the site manager, the most important different between Apache and IIS is
that Apache is controlled by a configuration file that is edited by the manager to change Apache
behavior.
• With IIS, server behavior is modified by changes made through a window based management
program, named the IIS snap-in , which controls both IIS and FTP.
• This program allows the site manager to set parameters for the server.
• URL is used to identify documents on the internet. There are many different kinds of resources ,
identified by different forms of URL.
URL FORMAT:
• All URLs have the same general format Scheme : Object –Address
• The scheme is often a communication protocol. Common scheme include http, ftp, gopher,
telnet, file, mail-to and news.
• Different scheme use objects address that have different forms. Our main interest is in the HTTP
protocol , which supports the web.
• In the case of http , the form of the object address of a URL is as follows.
Fully-qualified-domain-name/path-to-document
• To include a space or one of the disallowed special characters in a URL, the character must be
coded as a percent sign followed by the two digit hexadecimal ASCII code for the character.
• For example, if San José is a domain name, it must be typed as san%20jose (20 is the
hexadecimal ASCII code for a space).
URL PATH:
• The path to the document for the HTTP protocol is similar to path to a file or directory in the file
system of an operating system.
• A sequence of directory names and s filename, all separated by whatever separator character
the operating system uses.
• For UNIX server, the path is specified with forward slashes for windows servers, it is specified
with backward slashes.
• The path in a URL can differ from a path to a file because a URL need not include all directories
on the path.
• In most cases, the path to the document is relative to some base path that is specified in the
configuration files of the server; such paths are called partial paths.
http://www.xyz.com/storefront.html
• If specified document is a directory rather than a single document , the directory name is
followed immediately by a slash , as in the following
http://www.xyz.com/department/
• Sometimes a directory is specified (with the trailing slash) but its name is not given ,
http://www.xyz.com/
• The server then search at the top level of directory in which servable it recognize as a home
page.
• A browser needs some way of determining the format of a document it receives from a web
server.
• Without knowing the form of a document, the browser would be unable to render it.
TYPES SPECIFICATION:
• MIME was developed to allow different kinds of documents to be sent using internet mail.
• MIME was adopted as the way to specify document types transmitted over the web.
• When the browser receives the document from a web server , it uses the included MIME format
specification
Type/subtype
• The most common MIME types are text, image and video. The most common text subtype is
Plain and HTML.
• The most common image subtypes are “gif” and “jpeg” and “QuickTime”.
• A list of MIME specification is stored in the configuration files of every web server.
• Server determines the type of a document by using the filenames extension as the key into a
table of types.
• For example, the extension “.html” tells the server that it should attach text/html to the
document before sending it to the requesting browser.
• The name of an experimental subtype begins with “x-” as, in video/x – msvideo.
• Any web provider can add an experimental subtype by having its name added to the list of
MIME specification stored in the web provider’s server.
• Every browser has a set of MIME specification it can handle, all can deal with text/plain
(unformatted text) and text/html (html files) , among others.
• All web communication transaction use the same protocol, the Hypertext Transfer Protocol
(HTTP).
• The current version of HTTP is 1.1. It is formally defined as RFC 2616 , which consortium (W3C)
,http://www.w3.org
• HTTP consists of two phases, the request and the response. Each HTTP communication (request
or response) between a browser and a web server consists of two parts, a header and a body.
• The header contains information about the communication, the body contains the data of the
communication, it there is any.
2. Header fields
3. Blank line
4. Message body
GET/storefront.html HTTP/1.1
HTTP REQUEST:
• The first line of an http communication is any number of header fields, most of which are
optional.
• The format of a header field is the field name following by colon and the value of the field.
1. Status line
3. Blank line
4. Response body
• The status line includes the http version used , a three digit status code for the response
HTTP/1.1 200 OK
• The general meaning of the five categories specified by this first digit.
• One of the more common status codes is one users never want to see :
• 404 not found, which means the requested file could not be found.
• Of course, 200 ok is what users want to see because it means the request was handled without
error.
• The 500 code means the server has encountered a problem and was not able to fulfill the
request.
• In HTTP version prior to 1.1, when a server finished sending a response to the client, the
communication connection was closed.
SECURITY:
• The browser and web server are indeed large and complex software system, so security is a
significant problem in web application.
• One of the aspects of web security is the matter of getting ones data from the browser to the
server and having the server deliver data back to the browser without anyone or any device
intercepting or corrupting that data along the way.
• Consider just the simplest case that of transmitting a credit card number to a company from
which a purchase is being made.
1. PRIVACY: It must not be possible for the credit card number to be stolen while on its way to the
company server.
2. INTEGRITY: It must not be possible for the credit card number to be modified on its way to the
company server.
3. AUTHENTICATION: It must be possible for both the purchaser and the seller to be certain of
each other identify.
4. NONREPUDATION: It must be possible legally prove that the message was actually sent and
received.
• The basic tool to support privacy and integrity is encryption. Data to be transmitted is converted
or encrypted into a different form.
• Which is virtually impossible to decrypt for someone (or some computer)? Both encryption and
decryption are done with a key and a process (applying the key to the data).
• First developed for the internet. XYZ person used a crude encryption process on the message he
sent to his field generals while at war.
• Until the middle 1970, the process used the same key for both encryption and decryption.
Because both the sender and receiver used the same key.
• This problem was solved in 1976 by Whitfield differ and Martin Hellman of Stanford University,
who developed public key encryption.
1. Paired Tags: These tags come in pairs. That is they have both opening(< >) and closing(</ >) tags.
2. Empty Tags: These tags do not require to be closed.
Tags and attributes: Tags are individuals of html structure, we have to open and close any tag with a
forward slash like this <h1> </h1>. There are some variations with the tag some of them are self-
closing tag which isn’t required to close and some are empty tag where we can add any attributes in
it. Attributes are additional properties of html tags that define the property of any html tags. i.e.
width, height, controls, loops, input, and autoplay. These attributes also help us to store information
in meta tags by using name, content, and type attributes. Html documents structured mentioned
below:
HEAD: This contains the information about the HTML document. For Example, the Title of the
page, version of HTML, Meta Data, etc.
BODY: This contains everything you want to display on the Web Page.
<!DOCTYPE html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>GeeksforGeeks</title>
</head>
<body>
<h1>GeeksforGeeks</h1>
</body>
</html>
<!DOCTYPE html>: This tag is used to tells the HTML version. This currently tells that the version
is HTML 5.0
<html> </html> : <html> is a root element of html. It’s a biggest and main element in
complete html language, all the tags , elements and attributes enclosed in it or we can say
wrap init , which is used to structure a web page. <html> tag is parent tag of <head>
and <body> tag , other tags enclosed within <head > and <body>.
In <html > tag we use “lang” attributes to define languages of html page such as <html
lang=”en”> here en represents English language. some of them are : es = Spanish , zh-Hans =
Chinese, fr= french and el= Greek etc.
<head>: Head tag contains metadata, title, page CSS etc. Data stored in the <head> tag is not
displayed to the user, it is just written for reference purposes and as a watermark of the
owner.
<body>: A body tag is used to enclose all the data which a web page has from texts to links. All the
content that you see rendered in the browser is contained within this element. Following tags and
elements used in the body.
1 . <h1> ,<h2> ,<h3> to <h6>
2. <p>
3. <div> and <span>
4. <b>, <i> and<u>
5. <li>,<ul>and<ol>.
6. <img> , <audio> , <video> and<iframe>
7. <table> <th> , <thead>and<tr>.
8. <form>
9. <label> and <input> others………
CLIENT-SERVER TECHNOLOGIES:
The Client-server model is a distributed application structure that partitions task or workload between
the providers of a resource or service, called servers, and service requesters called clients. In the
client-server architecture, when the client computer sends a request for data to the server through
the internet, the server accepts the requested process and deliver the data packets requested back to
the client. Clients do not share any of their resources. Examples of Client-Server Model are Email,
World Wide Web, etc.
Client: When we talk the word Client, it mean to talk of a person or an organization using a
particular service. Similarly in the digital world a Client is a computer (Host) i.e. capable of
receiving information or using a particular service from the service providers (Servers).
Servers: Similarly, when we talk the word Servers, It mean a person or medium that serves
something. Similarly in this digital world a Server is a remote computer which provides
information (data) or access to particular services.
So, its basically the Client requesting something and the Server serving it as long as its present in the
database.
• XHTML is not programming language. It cannot be used to describe computations; its purpose is
to describe the general form and layout of documents to be displayed by a browser.
• The XHTML is not the first markup language used with computers. Tex and LaTex are older
markup languages for use with digital text.
• They are now used primarily to specify how mathematical expression and formula should
appear in print.
• An XHTML document is a mixture of content and controls. The controls are specified by the tags
of XHTML.
• The name of tag specifies the category of its content. Most XHTML tags consist of a pair of
syntactic markers that are used to delimit particular kinds of content.
• For example, a paragraph element specifies that its content, which appears between its opening
tag <p> and its closing tag </p>, is a paragraph.
• Some tag includes attribute specification that provide some additional information for the
browser.
<img src=“ab.jpg”/>
OVERVIEW OF XML:
• HTML is defined using the standard generalized markup language (SGML), which is a language
for defining markup languages (such language is called Meta markup languages).
• XML (eXtensible Markup Language) is a simplified version of SGML, designed to allow users to
easily create markup languages.
• XHTML is defined using XML, whereas XHTML users must use the predefined set of tags and
attributes, when a user creates his or her own markup language using XML.
• The set of tags and attributes are designed for the application at hand.
• The greater advantage of XML is that application programs can be written to use the meanings
of the tags in the given markup language to find specific kinds of data and process its
accordingly.
• The syntax rules of XML along with the syntax rules for specific XML based markup language,
allow documents to be validated before any application attempts to process their data.
OVERVIEW OF JAVASCRIPT:
• JavaScript is a client side scripting language whose primary uses in web programming are to
validate form data and to create dynamic XHTML documents.
• JavaScript “programs” are usually embedded in XHTML documents. These XHTML documents
are downloaded.
• When they are requested by browsers, the JavaScript code in an XHTML document is
interpreted by the browser on the client.
OVERVIEW OF JAVA:
• Java was designed by Sun Microsystems which controls its continuing development. Java
designers realized that java.
• It would be a powerful way to provide a computational capability for XHTML documents rather
than running programs on the web server to provide a computational capability.
• A special kinds of java program called an “Applet” can be resident on the server , but a compiled
version of the applet can be downloaded to the browser
• Compiled java is represented in an idealized machine language called “byte codes”. When the
browser receives a byte code applet, it “executes” it using a Java Virtual Machine (JVM), which is
an interpreter for byte codes.
• The primary differences are that JavaScript code is physically part of an XHTML document,
whereas applets are stored separately from the XHTL. Moreover JavaScript is less powerful than
java.
• A form of java class called a served can be used for these applications.
OVERVIEW OF PHP:
• PHP is a server side scripting language specifically designed for web applications .PHP code is
embedded in XHTML documents as is the case with JavaScript.
• With PHP, however, the code is interpreted on the server before the XHTML document is
delivered to the requesting client.
• A requested document that includes PHP code and insert its output into the XHTML document.
• PHP is similar to JavaScript, both in terms of its syntactic appearance and in terms of the
dynamic nature of its string and array.
• Both JavaScript and PHP use dynamic data typing meaning that the type of a variable is
controlled by the most recent assignment to it.
• PHP arrays are a combination of PERL’s arrays and PERL’s hashes (associative arrays).
• The language includes a large number of predefined functions for manipulating arrays. PHP
provide supports for many different database management systems.
OVERVIEW OF AJAX:
• AJAX shorthand for Asynchronous Java Script + XML. The idea of AJAX is relatively simple, but
results in a different way of viewing and building web interactions.
• This new approach results in an enriched web experience for those using a certain category of
web interaction.
• In a traditional(as opposed to AJAX) web interaction , the client sends messages to the server ,
either through clicking a link in the document being displayed on the browser or by submitting
forms to the server.
• After the link has been clicked or the form has been submitted, the client waits until the server
responds with a new document.
• The entire browser display is then replaced by the new document. In complicated documents
take a significant amount of time to be transmitted from the server to the client and more time
to be rendered by the browser.
• In an AJAX web application, there are two variations form the traditional web interaction.
• First, the communication from the browser to the server is asynchronous that is, the browser
need not wait for the server to respond.
• The browser user can continue whatever he or she was doing while the server finds and
transmits the requested document and the browser renders the new document.
• These two changes can result in much faster interactions between the browser and the server.
• The goal of AJAX is to have web based application becomes closer to desktop (client resident)
applications, in terms of the speed of interactions and there by the users experience.
• Rails is a development framework for web based applications that access databases. ASP.NET is
also a development framework for web based applications.
• Rail because of its intimate connection with Ruby , is often called Ruby on Rails or simply RoR
• Rails was developed by David Heinemeier Hansson in the early 2000 and was released to the
public in July 2004.
• Since then, it has rapidly gained widespread interest and usages. Rails is based on the Model
View Controller (MVC) architecture for applications, which clearly separates the presentation
and the data model from program logic.
• Rails applications are tightly bound to relational database. Many web applications are closely
integrated with database access, so this is a widely applicable architecture.
• Rails can and often is used in conjunction with AJAX. Rails use the JavaScript framework
prototype to support AJAX and interactions with the JavaScript model of the document being
displayed by the browser.
OVERVIEW OF PERL:
• Before applets and embedded scripts were developed, a computational capability was provided
for XHTML documents by allowing the document to request the execution of virtually any
program on the server.
• This is done using the Common Gateway Interface (CGI). Briefly, CGI is a standard way in which a
browser and a server communicate to run a program on the server and return the output of that
program to the browser.
• CGI programs can be written in any programming language that is supported by the server
machine. The most common used language for CGI program is PERL.
• The features of PERL that make it ideal for CGI programming are its direct access to operating
system functions.
• PERL syntax is similar to that of C. However, PERL code is not compiled into machine language
and executed, as in C. Instead, it is compiled to an intermediate language and interpreted
Its main function is to provide the Its primary function is to manipulate and provide
requested output to the end user. access to the respective database as per the request.
It does not provide security for data. It provides more security for data.
It is a technique used in web development It is a technique that uses scripts on the webserver to
in which scripts run on the client’s produce a response that is customized for each client’s
browser. request.
HTML, CSS, and javascript are used. PHP, Python, Java, Ruby are used.
No need of interaction with the server. It is all about interacting with the servers.
INTRODUCTION TO HTML:
HTML5 BASICS TAGS:
PARAGRAPH :
• Text is a normally organized into paragraph in the body of a document . In fact , the XHTML
standard does not allow text to be placed directly in a document body.
• Textual paragraph appears as the content of a paragraph element specified with the tag <p> .In
displaying the content of a paragraph.
• The browser puts as many words as will fits on the lines in the browser window . The browser
supplies a line break at the end of each line .
EXAMPLE:
<p> wel come
to
asp college
</p>
EXAMPLE :
<html>
<head>
<title> OUR FIRST DOCUMENT </title>
</head>
<body>
<p>
WEL COME TO S B S COLLEGE OF COMMERCE BCA DEPT
</p>
</body>
</html>
OUT PUT
OUR FIRST DCOUMENT
WEL COME TO S B S COLLEGE OF COMMERCE BCA DEPT
LINE BREAK :
• When the content of a paragraph element would be displayed at a position other than at the
beginning of a line , the browser breaks the current line and inserts a blank line.
• The break tag differs from the paragraph tag in that it can have no content and therefore has no
closing tag .
• The break tag is specified as <br /> . The slash indicate that the tag is both an opening and
closing tag.
• The space before the slash represent the absent content.
EXAMPLE :
<P> WEL COME TO <br /> A S PATIL COLLEGE OF COMMERCE </p>
OUT PUT :
WEL COME TO
A S PATIL COLLEGE OF COMMERCE
PRESERVING WHITESPACE :
HEADINGS :
• Text is often separated into section in documents by beginning each section with a heading .
• In XHTML , there are six levels of headings specified by the <h1> , <h2> , <h3> , <h4> , <h5> and
<h6>
• The <h1> specifies the highest level heading . Headings are displayed in a boldface font , whose
default size depends on the number in heading tag.
• On most browser <h1> , <h2> and <h3> use font sizes that are larger than that of the default
size of text <h4> uses the default size and <h5> and <h6> use smaller sizes.
EXAMPLE :
<html>
<body>
<h1> Admin </h1>
<h2> User </h2>
<h3> The Best </h3>
</body>
</html>
BLOCK QUOTATION :
• Block of the text to be set off from the normal flow of text in a document . In many cases , such
a block is a long quotation.
• The <blockquote> tag is designed for this situation . Browser designer determine how the
content of this tag , it can be made to look different from the surrounding text.
• The block of text is indented , either on the left or right side or both . Another possibilities is that
the block is set in italic.
EXAMPLE :
<html>
<body>
<p> sakjvc,vn,sdfkjf
CHARACTER ENTITIES :
• XHTML provide a collection of special characters that are sometimes needed in a document but
cannot be typed as themselves.
• In some cases , these characters are used in XHTML in some special way , for example > , < and
&.
• In other ways , the character do not appear on a keyboard such as the small raised circle that
represents “degree” in a references to temperature.
• List some of the most commonly used entities.
• The part of a document can be seprated from each other , making the document easier to read
by placing horizontal lines between them.
• Such lines are called horizontal rules. And the block tag that created them is <hr/>.
• The tag <hr/>causes a line break (ending the current line)
• NOTE : Again the slash in the <hr/> tag , it indicating that this tag has no content and no closing
tag.
• The meta element is used to provide additional information about a document. It has no
content, rather , all of the provided information is specified through attribute.
• The two attribute that are used to provide information are name and content. The user make up
a name as the value of the name attribute and specifies information through the content
attribute.
• One commonly chosen name is “keyword”
<meta name=“keyword” element =“binary tree , linked list />
<meta name = “title” content =“Miguel” />
<meta name=“keyword” content=“Novel , Kannada Literature />
IMAGES :
• The image is stored in a file , which is specified by an XHTML request . The image is inserted into
the display of the document by the browser.
IMAGE FORMATS :
• The two most common methods of representing images are Graphic Interchange Format (gif)
and Joint Photographic Experts Group (jpeg) format.
• Files in both of these formats are compressed to reduce storage needs and provide faster
transfer over the internet.
• The gif format to provide for the specific purpose of moving images. It uses 8 bit color
representations for pixels, allowing a pixel to have 256 different colors.
• The jpeg format uses 24 bit color representation for pixels, which allows jpeg images to include
more than 16 million different colors. file that stores jpeg images use the “ .jpg” extension on
their names.
• Jpeg is better at shrinking an image than the one used by gif . This compression process actually
loses some of the color accuracy of the image.
• The jpeg is can be smaller than the gif image. Because of this jpeg images are often preferred to
gif images. The disadvantage of jpeg is that, it does not support transparency.
• The third image format is now gaining popularity Portable Network Graphics (png) . This was
designed 1961.
• Actually, png provide a good replacement for both gif and jpeg because it has the best
characteristics of both .
IMAGES :
• The image is stored in a file , which is specified by an XHTML request . The image is inserted into
the display of the document by the browser.
IMAGE FORMATS :
• The two most common methods of representing images are Graphic Interchange Format (gif)
and Joint Photographic Experts Group (jpeg) format.
• Files in both of these formats are compressed to reduce storage needs and provide faster
transfer over the internet.
• The gif format to provide for the specific purpose of moving images . It uses 8 bit color
representations for pixels , allowing a pixel to have 256 different colors.
• The jpeg format uses 24 bit color representation for pixels , which allows jpeg images to include
more than 16 million different colors. file that stores jpeg images use the “ .jpg” extension on
their names.
• Jpeg is better at shrinking an image than the one used by gif . This compression process actually
loses some of the color accuracy of the image.
• The jpeg is can be smaller than the gif image . Because of this jpeg images are often preferred to
gif images . The disadvantage of jpeg is that , it does not support transparency.
• The third image format is now gaining popularity Portable Network Graphics (png) . This was
designed 1961.
• Actually , png provide a good replacement for both gif and jpeg because it has the best
characteristics of both .
• One drawback of png is that because its compression algorithm does not scarifies picture clarity
, its images require more space than comparable jpeg images
HYPERTEXT LINKS :
• A hypertext link in an XHTML document , which simply call a link here , acts as a pointer to some
resource.
• That resource can be XHTML document anywhere on the web.
LINKS :
• A link that pointers to a different document specifies the address of that document such an
address might be a filename a directory path and filename or a complete URL.
• Links are specified in an attribute of an anchor tag <a> , which is an inline tag.
• The anchor tag that specifies a link is called the source of that link. The document whose
address is specified in a link is called target of that link.
• The creating links only one is required to “href “ specifies the target of the link . If the target is in
another document in the same directory , the target is just the documents filename .
• If the target document is in some other directory the UNIX pathname.
• Abc/xyz.html use slash symbol only directory file access in that time abc.html
EX : <p> 1999 picture 210 px <br />
<a href=“abc.html” > Information </a>
</p>
LISTS :
UNORDERED LIST :
• The <ul> tag , which is a block tag , creates an unordered list. Each item in a list is specified with
an <li> tag (li is an acronym for list item).
• Any tags can appear in a list item including nested list.
EXAMPLE :
<body>
<h3>Common Heading</h3>
DEFINITION LIST :
• A definition list is given as the content of a <d1> tag , which is a block tag . Each term to be
defined in the definition list is given as the content of a <dt> tag.
• The definition themselves are specified as the content of <dd> tag . This tag usually displayed on
the left margin.
EXAMPLE :
<body>
<h3>Single Engine Airplanes<h3>
<dl>
<dt>152</t>
<dd>Two Placee Trainer </dd>
<dt>172</dt>
<dd>Smaller four place trainer</dd>
</dl><body>
OUT PUT :
Single Engine Airplane
152
Two Place Trainer
TABLES :
<head>
<title> Table with text and image </title>
</head>
<body>
<table border = "border">
<caption>Web Programming Details</caption>
<tr>
<th> CSS</th>
<th> Image </th>
</tr>
<tr>
<td> CSS1 </td>
<td> <img src = "a.jpg" alt = "cant display"/></td>
</tr>
<tr>
<td> CSS 2</td>
<td> <img src =
"b.jpg" alt = "cant
display"/></td> </tr>
</table>
</body>
</html>
</html>
EXAMPLE :
<html>
<head>
<title> cell spacing and cell padding </title>
</head>
<body>
<h3>Table with space = 10, pad = 50</h3>
<table border = "7" cellspacing = "10"
cellpadding = "50"> <tr>
<td> Divya </td>
<td>Chethan </td>
</tr>
</table>
<h3>Table with space = 50, pad = 10</h3>
TABLE SECTIONS :
• Tables occur in two and sometimes three parts : header , body and footer (not all tables have a
natural footers ).
• These three parts can be denoted in XHTML with the thead , tbody and tfoot elements.
• The header includes the column labels , the body includes the data of the table , including the
row label.
• The footer , when it appears sometimes has the column labels repeated after the body.
FORMS :
• The most common way for a user to communicate information from a web browser to the
server is through a form .
• XHTML provides tags to generate the commonly used objects on a screen form . These objects
are called “ controls ” or “ widget ” .
• These are controls for single line and multiple line text collection , checkboxes , radiobuttons
and menu , among others.
CHECK BOX :
• Checkbox and radio button are used to collect multiple choice input form the user . A checkbox
controls is a single button that is either on or off .
• If a checkbox button is on , the value associated with the name of the button is the strings
assigned to its value attribute.
• A checkbox button does not contribute to form data if it is off . Every checkbox button requires a
name attribute and a value attribute in its <input> tag.
<html>
<head>
<title>CheckBox</title>
</head>
<body>
<h3>Your Favorite Books?</h3>
<form action = " ">
<p>
<label><input type="checkbox" name="act" value="one"/>C++</label>
<label><input type="checkbox" name="act" value="two"/>DBMS</label>
<label><input type="checkbox" name="act" value="three"/>JAVA</label>
<label><input type="checkbox" name="act" value="four"/>C</label>
<label><input type="checkbox" name="act" value="four"/>DMS</label>
</p>
</form>
</body> </html>
<html>
<head>
<title>RadioButton</title> </head>
<body>
<h3>Your Favourite Book?</h3> <form action = " ">
<p>
<label><input type="radio" name="act" value="one"/>DBMS</label>
<label><input type="radio" name="act" value="two"/>C++</label>
<label><input type="radio" name="act" value="three"/>JAVA</label>
<label><input type="radio" name="act" value="four"/>DMS</label>
</p>
</form>
</body>
</html>
</html>
FRAMESETS :
• The number of frames and their layout in the browser window are specified with the <frameset>
tag . This tag , a element takes place of the body element in a document.
• This tag must have either a rows or a cols attributes and often they have both.
• The rows attribute specifies the number of rows of frames that will occupy the window.
• There are 3 kinds of values for rows number , percentage and asterisk. Normally two or more
values , separated by commas are given in a quoted string .
• When number is used as value , it specifies the height of one row in pixels.
<frameset rows=“200,300,400”>
• This frameset will have three rows of frames , because no cols attribute was included the frame
extend over the entire width of the browser window .
• In different capability , it is more practical to specify rows with percentage.
<frameset rows=“22% 33% 45%” >
• The cols attribute is very much like the rows attribute , except that it specifies the number of
columns of frame.
• For example , the following tag specifies that the window is to have six frame in three equal
height rows and two columns.
The HTML <b> element defines bold text, without any extra importance.
Example
Example
The HTML <i> element defines a part of text in an alternate voice or mood. The content inside is
typically displayed in italic.
Tip: The <i> tag is often used to indicate a technical term, a phrase from another language, a thought, a
ship name, etc.
Example
The HTML <em> element defines emphasized text. The content inside is typically displayed in italic.
Tip: A screen reader will pronounce the words in <em> with an emphasis, using verbal stress.
Example
Example
The HTML <mark> element defines text that should be marked or highlighted:
Example
The HTML <del> element defines text that has been deleted from a document. Browsers will usually
strike a line through deleted text:
Example
The HTML <ins> element defines a text that has been inserted into a document. Browsers will usually
underline inserted text:
Example
The HTML <sub> element defines subscript text. Subscript text appears half a character below the
normal line, and is sometimes rendered in a smaller font. Subscript text can be used for chemical
formulas, like H2O:
Example
The HTML <sup> element defines superscript text. Superscript text appears half a character above the
normal line, and is sometimes rendered in a smaller font. Superscript text can be used for footnotes, like
WWW[1]:
Example
Page layout is the part of graphic design that deals with the arrangement of visual elements on a page.
Page layout is used to make the web pages look better. It establishes the overall appearance, relative
importance, and relationships between the graphic elements to achieve a smooth flow of information
and eye movement for maximum effectiveness or impact.
Index / Sidebar: It holds additional information or advertisements and is not always necessary to
be added to the page.
Content Section: The content section is the central part where content is displayed.<main> tag is
used to add the main content of the webpages.
Footer: The footer section contains the contact information and other query related to web
pages. The footer section is always put on the bottom of the web pages. The <footer> tag sets the
footer on web pages.
Syntax:
<footer>
.....
</footer>
A semantic element clearly describes its meaning to both the browser and the developer.
Examples of non-semantic elements: <div> and <span> - Tells nothing about its content.
Examples of semantic elements: <form>, <table>, and <article> - Clearly defines its content.
According to W3C's HTML documentation: "A section is a thematic grouping of content, typically with a
heading."
A web page could normally be split into sections for introduction, content, and contact information.
Ex:
<section>
<h1>WWF</h1>
<p>The World Wide Fund for Nature (WWF) is an international organization
working on issues regarding the conservation, research and restoration of the
environment, formerly named the World Wildlife Fund. WWF was founded in
1961.</p>
</section>
<section>
<h1>WWF's Panda symbol</h1>
<p>The Panda has become the symbol of WWF. The well-known panda logo of WWF
originated from a panda named Chi Chi that was transferred from the Beijing
Zoo to the London Zoo in the same year of the establishment of WWF.</p>
</section>
Forum posts
Blog posts
User comments
Product cards
Newspaper articles
Example
<article>
<h2>Google Chrome</h2>
</article>
<article>
<h2>Mozilla Firefox</h2>
</article>
<article>
<h2>Microsoft Edge</h2>
</article>
Can we use the definitions to decide how to nest those elements? No, we cannot!
So, you will find HTML pages with <section> elements containing <article> elements, and <article>
elements containing <section> elements.
The <header> element represents a container for introductory content or a set of navigational links.
Note: You can have several <header> elements in one HTML document. However, <header> cannot be
placed within a <footer>, <address> or another <header> element.
<article>
<header>
<h1>What Does WWF Do?</h1>
<p>WWF's mission:</p>
</header>
<p>WWF's mission is to stop the degradation of our planet's natural
environment,
and build a future in which humans live in harmony with nature.</p>
</article>
Example
<footer>
<p>Author: Hege Refsnes</p>
<p><a href="mailto:[email protected]">[email protected]</a></p>
</footer>
MAP TAG:
The <map> tag is used to define an image map. An image map is an image with clickable areas.
The required name attribute of the <map> element is associated with the <img>'s usemap attribute and
creates a relationship between the image and the map.
The <map> element contains a number of <area> elements, that defines the clickable areas in the image
map.
<map name="planetmap">
<area shape="rect" coords="0,0,82,126" href="sun.htm" alt="Sun">
<area shape="circle" coords="90,58,3" href="mercur.htm" alt="Mercury">
<area shape="circle" coords="124,58,8" href="venus.htm" alt="Venus">
</map>
HTML stands for HyperText Markup Language. It is used to design web pages using a markup language.
It is a combination of Hypertext and Markup language. HTML uses predefined tags and elements that
tell the browser how to properly display the content on the screen. So, in this article, we will learn how
to embed audio and video in HTML. In order to insert multimedia files on web pages, we already know
how to insert images in HTML.
To embed audio in HTML, we use the <audio> tag. Before HTML5, audio cannot be added to web pages
in the Internet Explorer era. To play audio, we used web plugins like Flash. After the release of HTML5, it
is possible. This tag supports Chrome, Firefox, Safari, Opera, and Edge in three audio formats – MP3,
WAV, OGG. Only Safari browser doesn’t support OGG audio format.
Syntax:
</audio>
Ex:
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h2>Click play button to play audio</h2>
<audio src="./test.mp3" controls></audio>
</body>
</html>
To embed video in HTML, we use the <video> tag. It contains one or more video sources at a time
using <source> tag. It supports MP4, WebM, and Ogg in all modern browsers. Only Ogg video format
doesn’t support in Safari browser.
Syntax
<video>
<source src="file_name" type="video_file_type">
</video>
Example:
In this example, we will add a video to our webpage. To add video, we will use the <video> tag defining
source using <source> tag. Create an HTML file just like an audio file example and save the video file in
the same directory. Suppose a video file name test.mp4 save in the same directory where your HTML
file was saved.
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h2>Click play button to play video</h2>
<video src="./test.mp4" controls></video>
</body>
</html>