Webtec (Unit - 1) Notes
Webtec (Unit - 1) Notes
Webtec (Unit - 1) Notes
Unit - I
Web Technologies
The Internet is a global system of interconnected computer networks that use the
standard Internet Protocol Suite (TCP/IP) to serve billions of users worldwide. It is
a network of networks that consists of millions of private, public academic,
business, and government networks.
The building blocks of the Web are web pages which are formatted in HTML and connected by links
called "hypertext" or hyperlinks and accessed by HTTP.
HTTP
HTTP stands for Hypertext Transfer Protocol. This is the protocol being used to
transfer hypertext documents that makes the World Wide Web possible.
A standard web address such as Yahoo.com is called a URL and here the prefix
http indicates its protocol
Prepared By E.Swetha
SREE ABIRAAMI ARTS AND SCIENCE COLLEGE FOR WOMEN
URL
URL stands for Uniform Resource Locator, and is used to specify addresses on
the World Wide Web. A URL is the fundamental network identification for any
resource connected to the web (e.g., hypertext pages,images, and sound files).
A URL will have the following format −
protocol://hostname/other_information
The Web works as per the internet's basic client-server format as shown in the following image. The
servers store and transfer web pages or information to user's computers on the network when
requested by the users. The computer of a user who requests documents from a server is known as a
client. Browser, which is installed on the user' computer, allowsusers to view the retrieved documents
Prepared By E.Swetha
SREE ABIRAAMI ARTS AND SCIENCE COLLEGE FOR WOMEN
There are three main technologies involved in transferring information (web pages) from servers to
clients (computers of users). These technologies include Hypertext Markup Language (HTML),
Hypertext Transfer Protocol (HTTP) and Web browsers.
HTML is a standard markup language which is used for creating web pages. It describes the structure
of web pages through HTML elements or tags. In simple words, HTML is used to display text,
images, and other resources through a Web browser.
Web Browser:
A web browser, which is commonly known as a browser, is a program that displays text, data,
pictures, videos, animation, and more. It provides a software interface that allows you to click
hyperlinked resources on the World Wide Web.
In the beginning, browsers were used only for browsing due to their limited potential. Today, they are
more advanced; along with browsing you can use them for e-mailing, transferring multimedia files,
using social media sites, and participating in online discussion groups and more. Some of the
commonly used browsers include Google Chrome, Mozilla Firefox, Internet Explorer, Safari, and
more.
Hyper Text Transfer Protocol (HTTP) is an application layer protocol which enables WWW to work
smoothly and effectively. It is based on a client-server model. The client is a web browser which
communicates with the web server which hosts the website. This protocol defines how messages are
formatted and transmitted and what actions the Web Server and browser should take in response to
different commands. When you enter a URL in the browser, an HTTP command is sent to the Web
server, and it transmits the requested Web Page.
Prepared By E.Swetha
SREE ABIRAAMI ARTS AND SCIENCE COLLEGE FOR WOMEN
When we open a website using a browser, a connection to the web server is opened, and the browser
communicates with the server through HTTP and sends a request. HTTP is carried over TCP/IP to
communicate with the server. The server processes the browser's request and sends a response, and
then the connection is closed. Thus, the browser retrieves content from the server for the user.
Introduction to HTML
HTML stands for Hyper Text Markup Language. It is used to design web
pages using markup language. HTML is the combination of Hypertext and
Markup language. Hypertext defines the link between the web pages. Markup
language is used to define the text document within tag which defines the
structure of web pages.
HTML page structure:
It contain the essential building-block elements (i.e. doctype declaration,
html, head, title, and body elements) upon which all webpages are created
Prepared By E.Swetha
SREE ABIRAAMI ARTS AND SCIENCE COLLEGE FOR WOMEN
Prepared By E.Swetha
SREE ABIRAAMI ARTS AND SCIENCE COLLEGE FOR WOMEN
<html> : Every HTML code must be enclosed between basic HTML tags.
It begins with <html> and ends with </html> tag.
<head> : The head tag comes next which contains all the header
information of the web page or document like the title of the page and
other miscellaneous information. These informations are enclosed within
head tag which opens with <head> and ends with </head>.
<title> : This is a header information and hence mentioned within
the header tags. The tag begins with <title> and ends with </title>
<body> : The body tag contains the actual body of the page which will be
visible to all the users. This opens with <body> and ends with </body>.
Every content enclosed within this tag will be shown on the web page be
it writings or images or audios or videos or even links.
An HTML document can be created using any text editor . Save the text file
using .html or .htm. Once saved as an HTML document, the file can be
opened as a webpage in the browser.
Features of HTML:
Prepared By E.Swetha
SREE ABIRAAMI ARTS AND SCIENCE COLLEGE FOR WOMEN
Advantages:
HTML can only create static webpages. For dynamic webpages, other
languages have to be used.
A large amount of code has to be written to What is a list?
A list is a record of short pieces of information, such as people’s
names, usually written or printed with a single thing on each line andordered
in a way that makes a particular thing easy to find.
For example:
A shopping list
To-dolist
Prepared By E.Swetha
SREE ABIRAAMI ARTS AND SCIENCE COLLEGE FOR WOMEN
Lists in HTML
HTML offers three ways for specifying lists of information. All listsmust
contain one or more list
elements.
The types of lists that can be used in HTML are :
ul : An unordered list. This will list items using plain bullets.
ol : An ordered list. This will use different schemes of numbers tolist
your items.
dl : A definition list. This arranges your items in the same way asthey
are arranged in a dictionary.
An unordered list starts with the “ul” tag. Each list item starts withthe “li”
tag.The list items are marked with bullets i.e small blackcircles by default.
Example:
<!DOCTYPE html>
<html>
<body>
<h2>Grocery list</h2>
<ul>
<li>Bread</li>
<li>Eggs</li>
<li>Milk</li>
<li>Coffee</li>
</ul>
Prepared By E.Swetha
SREE ABIRAAMI ARTS AND SCIENCE COLLEGE FOR WOMEN
</body>
</html>
Output :
Prepared By E.Swetha
SREE ABIRAAMI ARTS AND SCIENCE COLLEGE FOR WOMEN
<!DOCTYPE html>
<html>
<body>
<h2>Grocery list</h2>
<ul style="list-style-type:circle">
<li>Bread</li>
<li>Eggs</li>
<li>Milk</li>
<li>Coffee</li>
</ul>
</body>
</html>
Prepared By E.Swetha
SREE ABIRAAMI ARTS AND SCIENCE COLLEGE FOR WOMEN
Output :
<html>
<body>
Prepared By E.Swetha
SREE ABIRAAMI ARTS AND SCIENCE COLLEGE FOR WOMEN
<h2>Grocery list</h2>
<ul style="list-style-type:square">
<li>Bread</li>
<li>Eggs</li>
<li>Milk</li>
<li>Coffee</li>
</ul>
</body>
</html>
Output :
An ordered list starts with the “ol” tag. Each list item starts with the“li”
tag. The list items are marked with numbers by default.
Example:
<!DOCTYPE html>
Prepared By E.Swetha
SREE ABIRAAMI ARTS AND SCIENCE COLLEGE FOR WOMEN
<html>
<body>
<h2>Grocery List</h2>
<ol>
<li>Bread</li>
<li>Eggs</li>
<li>Milk</li>
<li>Coffee</li>
</ol>
Prepared By E.Swetha
SREE ABIRAAMI ARTS AND SCIENCE COLLEGE FOR WOMEN
</body>
</html>
Output :
<!DOCTYPE html>
<html>
<body>
<ol type="1">
<li>Bread</li>
<li>Eggs</li>
<li>Milk</li>
<li>Coffee</li>
Prepared By E.Swetha
SREE ABIRAAMI ARTS AND SCIENCE COLLEGE FOR WOMEN
</ol>
</body>
</html>
Output :
Prepared By E.Swetha
SREE ABIRAAMI ARTS AND SCIENCE COLLEGE FOR WOMEN
<!DOCTYPE html>
<html>
<body>
<ol type="A">
<li>Bread</li>
<li>Eggs</li>
<li>Milk</li>
<li>Coffee</li>
</ol>
</body>
</html>
Output :
Prepared By E.Swetha
SREE ABIRAAMI ARTS AND SCIENCE COLLEGE FOR WOMEN
<!DOCTYPE html>
<html>
<body>
<ol type="I">
<li>Bread</li>
<li>Eggs</li>
Prepared By E.Swetha
SREE ABIRAAMI ARTS AND SCIENCE COLLEGE FOR WOMEN
<li>Milk</li>
<li>Coffee</li>
</ol>
</body>
</html>
Output :
A description list is a list of terms, with a description of each term. The <dl>
tag defines the description list, the <dt> tag defines theterm name, and
the <dd> tag describes each term.
Example:
<!DOCTYPE html>
<html>
<body>
<dl>
<dt>Coffee</dt>
Prepared By E.Swetha
SREE ABIRAAMI ARTS AND SCIENCE COLLEGE FOR WOMEN
<dt>Milk</dt>
</dl>
</body>
</html>
Output :
Prepared By E.Swetha
SREE ABIRAAMI ARTS AND SCIENCE COLLEGE FOR WOMEN
<!DOCTYPE html>
<html>
<body>
<ul>
<li>Coffee</li>
<li>Tea
<ul>
<li>Black tea</li>
<li>Green tea</li>
</ul>
</li>
<li>Milk</li>
</ul>
</body>
</html>
Prepared By E.Swetha
SREE ABIRAAMI ARTS AND SCIENCE COLLEGE FOR WOMEN
Output :
Prepared By E.Swetha
SREE ABIRAAMI ARTS AND SCIENCE COLLEGE FOR WOMEN
HTML Table
A table is an arrangement of data in rows and columns, or possibly in a more
complex structure. Tables are widely used in communication, research, and
data analysis.
Tables are useful for various tasks such as presenting text information and
numerical data.
Tables can be used to compare two or more items in tabular form layout.
Tables are used to create databases.
Defining Tables in HTML
An HTML table is defined with the “table” tag. Each table row is defined
with the “tr” tag. A table header is defined with the “th” tag. By default,
table headings are bold and centered. A table data/cell is defined with the
“td” tag.
Example:
<!DOCTYPE html>
<html>
<body>
<table>
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Age</th>
</tr>
Prepared By E.Swetha
SREE ABIRAAMI ARTS AND SCIENCE COLLEGE FOR WOMEN
<tr>
<td>Priya</td>
<td>Sharma</td>
<td>24</td>
</tr>
<tr>
<td>Arun</td>
<td>Singh</td>
<td>32</td>
</tr>
<tr>
<td>Sam</td>
Prepared By E.Swetha
SREE ABIRAAMI ARTS AND SCIENCE COLLEGE FOR WOMEN
<td>Watson</td>
<td>41</td>
</tr>
</table>
</body>
</html>
Output:
Prepared By E.Swetha
SREE ABIRAAMI ARTS AND SCIENCE COLLEGE FOR WOMEN
<!DOCTYPE html>
<html>
<head>
<title>HTML Table Cellpadding</title>
</head>
<body>
<table border = "1" cellpadding = "5" cellspacing = "5">
<tr>
<th>Name</th>
<th>Salary</th>
</tr>
<tr>
<td>Ramesh Raman</td>
Prepared By E.Swetha
SREE ABIRAAMI ARTS AND SCIENCE COLLEGE FOR WOMEN
<td>5000</td>
</tr>
<tr>
<td>Shabbir Hussein</td>
<td>7000</td>
</tr>
This</table>
will produce the following result –
</body>
</html>
Prepared By E.Swetha
SREE ABIRAAMI ARTS AND SCIENCE COLLEGE FOR WOMEN
<!DOCTYPE html>
<html>
<head>
<title>HTML Table Colspan/Rowspan</title>
</head>
<body>
<table border = "1">
<tr>
<th>Column 1</th>
<th>Column 2</th>
<th>Column 3</th>
</tr>
<tr>
<td rowspan = "2">Row 1 Cell 1</td>
Prepared By E.Swetha
SREE ABIRAAMI ARTS AND SCIENCE COLLEGE FOR WOMEN
</html>
Prepared By E.Swetha
SREE ABIRAAMI ARTS AND SCIENCE COLLEGE FOR WOMEN
<!DOCTYPE html>
<html>
<head>
<title>HTML Table Width/Height</title>
</head>
<body>
<table border = "1" width = "400" height = "150">
<tr>
<td>Row 1, Column 1</td>
<td>Row 1, Column 2</td>
Prepared By E.Swetha
SREE ABIRAAMI ARTS AND SCIENCE COLLEGE FOR WOMEN
</tr>
<tr>
<td>Row 2, Column 1</td>
<td>Row 2, Column 2</td>
</tr>
This</table>
will produce the following result −
</body>
</html>
HTML frame
HTML Frames are used to divide the web browser window into multiple
sections where each section can be loaded separately. A frameset tag is the
collection of frames in the browser window.
Creating Frames: Instead of using body tag, use frameset tag in HTMLto
use frames in web browser. But this Tag is deprecated in HTML 5.
The frameset tag is used to define how to divide the browser. Each frame is
indicated by frame tag and it basically defines which HTML document shall
open into the frame. To define the horizontal framesuse row attribute of frame
tag in HTML document and to define the vertical frames use col attribute of
frame tag in HTML document.
Example:
Prepared By E.Swetha
SREE ABIRAAMI ARTS AND SCIENCE COLLEGE FOR WOMEN
<!DOCTYPE html>
<html>
<head>
<title>Example of HTML Frames using row attribute</title>
</head>
Prepared By E.Swetha
SREE ABIRAAMI ARTS AND SCIENCE COLLEGE FOR WOMEN
Prepared By E.Swetha
SREE ABIRAAMI ARTS AND SCIENCE COLLEGE FOR WOMEN
Prepared By E.Swetha
SREE ABIRAAMI ARTS AND SCIENCE COLLEGE FOR WOMEN
browser. This attribute is used to define no of rows and its sizeinside the
frameset tag.
The size of rows or height of each row use the following ways:
Use absolute value in pixel
Example:
src: This attribute in frame tag is basically used to define the source
file that should be loaded into the frame.The value of src can be any
Prepared By E.Swetha
SREE ABIRAAMI ARTS AND SCIENCE COLLEGE FOR WOMEN
url.
Example:
<frame name = "left" src = "/html/left.htm" />
In the above example name of frame is left and source file willbe
loaded from “/html/left.htm” in frame.
marginwidth: This attribute in frame tag is used to specify
Prepared By E.Swetha
SREE ABIRAAMI ARTS AND SCIENCE COLLEGE FOR WOMEN
marginheight: This attribute in frame tag is used to specify
height of the spaces in pixels between the border and contents
of top and bottom frame.
Example:
<frame marginheight="20">
Advantages:
It allows the user to view multiple documents within
asingle Web page.
It load pages from different servers in a single frameset.
Disadvantages:
Prepared By E.Swetha
SREE ABIRAAMI ARTS AND SCIENCE COLLEGE FOR WOMEN
<IMG SRC="some.gif">
Prepared By E.Swetha