Module1 Final
Module1 Final
Origins
Department of Defence (DoD) became interested in developing large scale
computer network in 1960’s
The DoD’s Advanced Research Projects Agency (ARPA) funded the research
organizations
ARPAnet
BITnet, CSnet - late 1970s & early 1980s
email and file transfer for other institutions
NSFnet - 1986
Originally for non-DOD funded places
Initially connected five supercomputer centers
By 1990, it had replaced ARPAnet for non-military uses
Soon became the network for all (by the early 1990s)
At the lowest level, since 1982, all connections use TCP/IP
These names begin with the name of the host machine, followed by progressively larger enclosing
collections of machines, called domains.
Form: host-name.domain-names
movies.marxbros.comedy.com
Fully qualified domain name - the host name and all of the domain names
Domain Name Conversion
The steps for conversion from DNS to IP
If one of the name server is not able to convert DNS to IP, it contacts
other server
The host name and all domain name form Fully qualified Domain
Name
World Wide Web (WWW)
Origins
In 1989, a small group of people led by Tim Berners-Lee at CERN(Conseil Européen
pour la Recherche Nucléaire )or European Organization for Particle Physics proposed
a new protocol for the Internet, as well as a system of document access to use it.
To allow scientists around the world to use the Internet to exchange documents
describing their work.
The proposed system was designed to allow a user anywhere on the Internet to
search for and retrieve documents from databases.
In 1991, the system was ported to other computer platforms and released to the
rest of the world.
What is Hypertext?
Hypertext is text displayed on a computer display or other electronic devices with
references (hyperlinks) to other text that the reader can immediately access.
Hypertext has been developed and had appeared in Xerox’s NoteCards and Apple’s
HyperCard in the mid-1980s.
Web or Internet?
The Internet is a collection of computers and other devices connected by equipment
that allows them to communicate with each other.
The Web is a collection of software and protocols that has been installed on most of
the computers on the Internet.
Some of these computers run Web servers, which provide documents, but most run
Web clients, or browsers, which request documents from servers and display them to
users.
Web Browsers
When two computers communicate over some network, one acts as a client and the
other as a server.
The client initiates the communication, which is often a request for information
stored on the server, which then sends that information back to the client.
Documents provided by servers on the Web are requested by browsers, which are
programs running on client machines.
They are called browsers because they allow the user to browse the resources
available on servers
The first browsers were text based—they were not capable of displaying graphic
information, nor did they have a graphical user interface.
Most requests are for existing documents, using HyperText Transfer Protocol
(HTTP)
But some requests are for program execution, with the output being returned as
a document
Web Servers
Servers are slave programs: They act only when requests are made to
them by browsers running on other computers on the Internet.
All communications between browsers and servers use Hypertext Transfer Protocol
(HTTP)
Web Server-Apache,
Web Server Operation
Web browsers initiate network communications with servers by sending them
URLs.
A URL can specify-the address of a data file stored on the server or a program
stored on the server
General form:
scheme: object-address
The scheme is often a communications protocol, such as http,
telnet, ftp
ftp://internet.address.edu/file/path/file.txt
For the http protocol, the object-address is: fully qualified domain
name/doc path
//fully-qualified-domain-name/path-to-document
For the file protocol, only the doc path is needed
file://path-to-document
Host name may include a port number (80 Default Port number)
Type specifications
Form:
type/subtype
e.g., video/x-msvideo
Version Year
Initial version of HTML 1991
HTML 2.0 1995
HTML 3.2 1997
HTML 4.0 1997
HTML 4.1 1999
XHTML 1.0 2000
HTML 5 2012
XHTML 5 2013
Difference between XHTML and HTML
Basic Syntax
Elements are defined by tags
Tag format:
Opening tag: <name>
Closing tag: </name>
The opening tag and its closing tag together specify a container for the content
they enclose
Not all tags have content
If a tag has no content, its form is <name />
The container and its content together are called an element
<p> This is Web Technology </p>
If a tag has attributes, they appear between its name and the right bracket of the opening tag
<html lang = "en">
2. <!– – AbcHome.html
This describes the home page of
Abc
– –>
Browsers ignore comments, unrecognizable tags, line breaks, multiple spaces,
and tabs
Tags are suggestions to the browser, even if they are recognized by the browser
Standard HTML Document Structure
The first line of every HTML document is a DOCTYPE command
<!DOCTYPE html>
It specifies the particular SGML Document-Type Definition (DTD) with which the
document complies.
It defines the document structure with a list of validated elements and attributes.
An HTML document must include the four tags <html>, <head>, <title>, and
<body>.
The head element provides information about the document but does not provide its
content.
The head element always contains two simple elements, a title element and a meta
element.
The meta tag specifies the character set used to write the document.
Basic skeletal document that illustrates the basic structure:
<!DOCTYPE html>
<!–– File name and document purpose ––>
<html lang = "en">
<head>
<title> A title for the document </title>
<meta charset = "utf-8" />
...
</head>
<body>
...
</body>
</html>
2.4 Basic Text Mark up
It tells us how the text content of an HTML document body can be formatted with HTML
tags
2.4.1 Paragraphs
The HTML <p> element defines a paragraph.
A paragraph always starts on a new line, and browsers automatically add some white
space (a margin) before and after a paragraph.
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
2.4.2 Line Breaks
Text requires an explicit line break without the preceding blank line. This is exactly what
the break tag does
<br />
Example:
<p>
Hello my name is Sujayeendra Rao, <br />
Am Working at NIE, Mysuru</p>
Output:
Hello, my name is Sujayeendra Rao,
I am working at NIE, Mysuru.
2.4.4 Headings
In HTML, there are six levels of headings, specified by the tags
<h1> ,<h2>,<h3>,<h4>,<h5>,<h6>.
Headings are usually displayed in a boldface font whose default font size
depends on the number in the heading tag.
2.4.5 Block Quotations
Browser designers are allowed to determine how the content of <blockquote> can be
made to look different from the surrounding text.
blockquote.html
2.4.6 Font Styles and Sizes
Boldface - <b>
Italics - <i>
Larger - <big>
Smaller - <small>
Monospace - <tt> -Display text in mono space font.
Subscript -<sub>
Superscript-<sup>
Font Style and Sizes.html
Content-based style tags
They indicate the style of the text that appears in their content.
1. The emphasis element <em>
Specifies that its textual content is special and should be displayed in some way that
indicates this distinctiveness.
image.html
2.6 Hypertext Links
It acts as a pointer to some particular place in some Web resource.
Hypertext is a data which when clicked redirects us to some other location, while
the hyperlink is a link to a computer resource embedded in the hypertext.
The document whose address is specified in a link is called the target of that
link.
For creating links, only one attribute is required: href [hypertext reference]
hyperlink.html
HTML Lists
HTML lists allow web developers to group a set of related items
in lists.
Types of Lists
Unordered List
Ordered List
Definition List
Unordered HTML List
An unordered list starts with the <ul> tag.
The list items will be marked with bullets (small black circles) by
default
Can be nested.
<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
Ordered HTML List
An ordered list starts with the <ol> tag.
Can be nested
<ol>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
Definition lists
are used to specify lists of terms and their definitions
Each term to be defined in the definition list is given as the content of a dt element.
The defined terms of a definition list are usually displayed in the left margin; the
definitions are usually shown indented on the line or lines following the term,
<dl>: The Description List element.
<dt>: The Description Term element
<dd>: The Description Details element
<dl>
<dt>Coffee</dt>
<dd>- black hot drink</dd>
<dt>Milk</dt>
<dd>- white cold drink</dd>
</dl>
Tables
A table is a matrix of cells.
Tabel.html
<table>
<caption> Fruit Juice Drinks </caption>
<tr>
<th> </th>
<th> Apple </th>
<th> Orange </th>
<th> Screwdriver </th>
</tr>
<tr>
<th> Breakfast </th>
<td> 0 </td>
<td> 1 </td>
<td> 0 </td>
</tr>
<tr>
<th> Lunch </th>
<td> 1 </td>
<td> 0 </td>
<td> 0 </td>
</tr>
</table>
Colspan and Rowspan attributes
To make a cell span over multiple columns user needs to make use of colspan attribute
To make a cell span over multiple rows user needs to make use of rowspan attribute
NIE
NIE
Cellpadding and Cellspacing Attributes
cellpadding and cellspacing will be used to adjust the white space in your table
cells.
The cellspacing attribute defines space between table cells, while cellpadding
represents the distance between cell borders and the content within a cell.
Cellspacing
Cellpadding
Forms
The most common way for a user to communicate information from
a Web browser to the server is through a form
An HTML form is used to collect user input. The user input is most
often sent to a server for processing.
When the user clicks the Submit button, the form data is encoded
and sent to the Web server
The form element
All of the controls of a form appear in the content of a form element
<form> tag can have several different attributes, only one of which,
action attribute is required.
The action attribute specifies the URL of the application on the Web
server that is to be called when the user clicks the Submit button.
The method attribute of <form> specifies which technique, get or post, will be used
to pass the form data to the server.
The default is get, so if no method attribute is given in the <form> tag, get will be
used.
Example:
<input>
<label>
<select>
<textarea>
<button>
Form.html
The Input element
One of the most used form element is the <input> element.
Scrollbar will be included if the size is more than the text box
The <select> element is most often used in a form, to collect user input.
The name attribute is needed to reference the form data after the form is
submitted (if you omit the name attribute, no data from the drop-down
list will be submitted).
The <option> tags inside the <select> element define the available
options in the drop-down list.
check.html
With size = 1 (the default) –Scrollbar
The multiple attribute specifies that multiple options can be selected at once
The text typed into the area created by textarea is not limited in length, and there is
implicit scrolling when needed, both vertically and horizontally
<form>
Enter your address:<br>
<textarea rows="2" cols="20"></textarea>
</form>
text_area.html
The Action Buttons
The Reset button clears all of the controls in the form to their
initial states.
Submit button has two actions: First, the form data is encoded
and sent to the server; second, the server is requested to execute
the server-resident program specified in the action attribute of
the <form> tag.