Unit-1 Notes Web Tech
Unit-1 Notes Web Tech
Introduction to Internet
The Internet is a global network of networks connecting millions of users worldwide via many
computer networks using a simple standard common addressing system and basic communications
protocol called TCP/IP (Transmission Control Protocol/Internet Protocol).
This allows messages sent over the Internet to be broken into small pieces, called packets, which travel
over many different routes between source and destination computers.
You can think of the Internet as a physical collection of routers and circuits as a set of shared resources.
Internet-Based Services
Some of the basic services available to Internet users are
Email − A fast, easy, and inexpensive way to communicate with other Internet users around the world.
Telnet − Allows a user to log into a remote computer as though it were a local system.
FTP − Allows a user to transfer virtually every kind of file that can be stored on a computer from one
Internet-connected computer to another.
UseNet news − A distributed bulletin board that offers a combination news and discussion service on
thousands of topics.
World Wide Web (WWW) − A hypertext interface to Internet information resources
What is 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.
Web site:
A set of interconnected web pages, usually including a homepage, generally located on the same server, and
prepared and maintained as a collection of information by a person, group, or organization.
Web Page:
A web page is a document that's created in html that shows up on the internet when you type in or go to the web
page's address.
Dynamic web page: is generated by a web application that is driven by server-side software or client-side
scripting. Dynamic web pages help the browser (the client) to enhance the web page through user input to the
server. Contents can be changed as evolution over time.
Web –Server
Web server refers to either the hardware (the computer) or the software (the computer application) that helps to
deliver web content that can be accessed through the Internet.
The most common use of web servers is to host websites, but there are other uses such as gaming, data storage
or running enterprise application.
INTRODUCTION TO HTML :
HTML stands for Hypertext Markup Language. It is a Language used to create Web Pages or Hypertext
document. A Markup Language is a set of instructions often called TAGS which can be added to text files.
HTML is only a formatting language are not a programming language. The idea behind hypertext is that instead
of reading text in a right linear structure we can easily jump from one point to another point.HTML is all about
specifying the structure and format of our webpage i.e, it is mainly used for describing the structure document.
HTML is platform independent i.e, for example if we can access internet, we can access WORLD WIDE WEB
(WWW) irrespective of client OS and OS of the webserver are accessing. So, we can view one download
HTML files on www through browser. Elements of a web document are labelled through the usage of HTML
tags. It is the tags that describe the document. Anything that is not a tag will be displayed in the document itself.
HTML does not describe any page layout i.e, for example, word for windows have different styles for headings,
font size etc.
But HTML doesn’t have all these. Based on the Platforms, appearance of any element will change. The
formatted text will appear differently on different machines / Platforms. By separating the Structure of the
document and appearance, a Program that reads and Understands HTML can make formatting decision based on
capabilities of individual Platform. Web Browsers are best examples of HTML formatters.
Advantages of HTML:- • A HTML document is small and hence easy to send over the net. It is small because it
doesn’t include format information. • HTML documents are cross platform compatible and device independent.
We need a HTML readable browser to view them.
(1) <!doctype> :
: This tag formally starts an HTML document and it also indicates theversion of HTML used.
(2) <HTML>:
Every HTML document starts with a <html> tag and it is always the firsttag in a html
page and indicates that the document is a HTML document.The end tag <html> is
</html>.
Example:
<html>……..</html>
(3) <head>:
It contains the head of an html document, which holds about the document such as title.
Each property defined html page should have a head which we create with <head> tag.
It has header information and it isdisplayed at the top of the browser. Each tag for
<head> is </head>.
<head>…….</head>
(4) <title>:
It contains the title of the html document which includes the content thatwill actually
appear in the web browser. The entire content of the web page is placed in the pages
<body> tag. The end tag <body> is </body>
<title>…….</title>
(5) <body>:
It contains the body of the HTML Document , which includes the content that will
actually appear in the web browser. The entire content of the webpage will be placed in
<body>………</body>
The HTML Program is generally divided into two sections i.e head and body. We use and
tags to indicate these two sections. section holds the header information of a webpage document indicated by a
title that is provided by using .we want to display which the webpage. Anything that is not a tag will be
displayed within the webpage.
Example:
<html>
<head>
<title>First Webpage</title>
</head>
<body>
</body>
</html>
Attribute:
An Attribute is a Keyword we use in an opening tag to give more information tothe web
browser. HTML tags tell the web browsers how to format and organizeour webpages. But we
<tagname Attribute=value>
(16)<!-- --> Comment tag: Annotates a web page with a comment. In the
HTML that we can by lookingat the HTML
but it will not be displayed in the web
browser.
<! ------ This is a comment--------- >
Formatting with HTML tags:
To set the actual style of text as displayed in a web page we can text style tags.There are a
(1) <b>:
It creates a bold text i.e, sets the text style to bold.
Attributes:
a. Id:
It is a unique alphanumeric identifier for the tag which we can use to refer toit.
b. Style:
Example:
<html>
<head>
</head>
<body bgcolor=”pink”>
</body>
</html>
(2)<I>:
<U>:
<P>:
Example:
<html>
<head>
</head>
<body bgcolor=”pink”>
</body>
</html>
3)Headings:
the headings in our web pages by displaying bold text in avariety of sizes <h1> being
Example:
<html>
<head>
</head>
<body bgcolor=”pink”>
<center>
</center>
</body>
</html>
(4)<font>:
This tag will give us an option to select text size, color and face.
Attributes:
d. Id: Unique alphanumeric identifier for a tag, which we can use to refer to it.
Example:
<html>
<head>
</head>
<body bgcolor=”pink”>
<center>
</center>
</body>
</html>
Lists:
Lists lets us display information in a compact, right format. There are three kindsof lists:
1. Unordered List
2. Ordered List
3. Definition List
Unordered List:
An Unordered list is a list of items that are marked with burden. The Unordered list is
created by using <ul>tag are the list items in the list are createdby </ul> tag and the list items in
<ul>
</ul>
Example:
<html>
<head>
</head>
<body bgcolor=”pink”>
<ul>
<li>GPREC</li>
<li>RGMCET</li>
<li>GPCET</li>
</ul>
</body>
</html>
Ordered List:
While the unordered lists display simple bullet before each list item. Ordered lists use a number system /
lettering scheme to indicate that the items are ordered in some ways, ordered lists are created by <ol> tag
and the list items are created using <li> tag.
Example:
<html>
<head>
</head>
<body bgcolor=”pink”>
<ol>
<li>CSE</li>
<li>IT</li>
<li>ECE</li>
<li>EEE</li>
<li>CIVIL</li>
<li>ME</li>
</ol>
</body>
</html>
Definition List:-
These lists include both definition terms as well as their definition. To create the definition lists we use <dl>
tag. For creating definition terms we use <dt> tag and for data definitions we use <dd> tag.
Example:
<html>
<head>
</head>
<body bgcolo=”pink”>
<dl>
<dt>IT<dd>Information Technology
<dt>CE<dd>Civil Engineering
</dl>
</body>
</html>
Creating Hyperlinks:
What makes the web so effective is the ability to define links from one page to another. In web terms, a
“hyperlinks” is a reference on the web. Hyperlinks can point to any resources on the web. An anchor is a
term used to define a hyperlink destination inside a document. Format of anchor tag is:
2. Id: A unique alphanumeric identifier for the tag, which we can use to refer to it.
3. name: It specifies an anchor name, the name we want to use when referring to enclose items.
4. Target: This attribute defines where the linked document will be opened.
Example:
<html>
<head>
</head>
<body bgcolor="pink">
</center>
</body>
</html>
The default color of hyperlinks in a page is blue. Hyperlink that we have already visited are displayed in
violet and when we click a hyperlink,it turns red when the mouse button is down.We can set these colos in
<body> tag attributes link,vlink(visited link),alink(active link).
Example
<html>
<head>
</head>
</body>
</html>
Format
<table>
<tr>
<td>row1,col1</td>
<td>row1,col2</td>
</tr>
<tr>
<td>row2,col1</td>
<td>row2,col2</td>
</tr>
</table>
Format
<table>
<tr>
<th>heading 1</th>
<th>heading 2</th>
</tr>
<tr>
<td>data1</td>
<td>data2</td>
</tr>
</table>
• align : specifies the horizontal alignment of the table in the browser window,set to ”left,center,right”.
• background : specifies the URL of a background image to be used as background for the table.
• bgcolor : sets the background color of the table cells.
• align : specifies the horizontal alignment content in the table cells set to “left,center,right”.
• align : specifies the horizontal alignment content in the table cells set to “left,center,right”.
• colspan : indicates the how many cell columns of the table this cell should span.
• rowspan : indicates the how many cell rows of the table this cell should span.
Example
<html>
<head>
<title>Creating Tables</title>
</head>
<body bgcolor="pink">
<center><h1>Creating tables</h1>
<tr>
<th colspa=”2”>Websites</th>
</tr>
<tr>
<td>Mail sites</td>
<td>Job sites</td>
</tr>
<tr>
<td>Gmail.com</td>
<td>Frushersworld.com</td>
</tr>
<tr>
</tr>
<td>Yahoo.com</td>
<td>Nauted.com</td>
</center>
</table> </body></html>
• <thead> : The rows in a table can bc groudated one are more time we can create a table by using this
<thead>.
Example:
<html>
<head>
</head>
<body bgcolor="pink">
<center>
<table border="2">
<caption>Subject Description</caption>
<thead>
</thead>
<tbody>
<tr> <td>Units</td>
<td>Contents</td>
</tr>
<tr> <td>I</td>
<tr> <td>II</td>
<td>JavaScript</td>
</tr>
<tr> <td>III</td>
<td>XML</td>
</tr>
</tbody>
<tfoot align="center">
<tr>
</tr>
</tfoot>
</table>
</center>
</body>
</html>
Images in HMTL:
In HTML we have the capability of displaying images in a webpage.This images must be in a format that
the web browser can handle , such as Graphics Interchange Format(GIF) , Joint Photograph Expert
Group(JPEG) , and for some browser Portable Network Graphics(PNG) formats.
Format
Example
<html>
<head>
<title>Images</title>
</head>
<body bgcolor="pink">
<center>
<h1>Images Example</h1>
<h3>Here is an image</h3>
</center>
</body>
</html>
<head>
</head>
<body bgcolor="pink">
<center>
<h3>Here is an image</h3>
</center>
</body></html>
Format is :
<frameset rows=”30%,70%”>
</frameset>
• border : used in the outermost <frameset> tag to set the border thickness for frames.
• bordercolor : set the color of the borders for all frames in the frameset.
• frameborder : set whether or not border for all frames in the frameset. Can be set to ‘yes’ or ‘no’ or ‘1’ or
‘0’.
• framespacing : set the pixel spacing between frames. set to the positive integers.
• cols : set the number of columns in the frameset. Separate the values assigned to this attribute with
comma(,) each value represents width of a column. Can be set to pixel values,percentages.
• Rows : set the number of rows in the frameset. Separate the values assigned to this attribute with
comma(,) each value represents width of a column. Can be set to pixel values,percentages.
• bordercolor : set the color used for the frmae border. This setting overrides the color specified in the
surrounding <frameset> element.
• frameborder : sets whether or not border surround the frame. Can be set to ‘yes’ or ‘no’ or ‘1’ or ‘0’.
• name : sets the name of the frame we can use named frames as target for <a> tag.
• src : specifies the URL of the frame document. If we don’t specify a URL the frame will appear blank.
Example
<html>
<head>
<title>Vertical Frames</title>
</head>
<frameset cols="30%,70%">
<frame src=frame1.html>
<frame src=frame2.html>
</frameset>
</html>
Frame1.html
<html>
<head>
<title>page1</title>
</head>
<body>
<h1>Web Technologies</h1>
</body>
</html>
Frame2.html
<html>
<head>
<title>page2</title>
</head>
<body>
<h1>Web Technologies</h1>
</body>
</html>
Output
Example
<html>
<head>
<title>Horizontal Frames</title>
</head>
<frameset cols="50%,50%">
<frame src=page1.html>
<frame src=page2.html>
</frameset>
</html>
page1.html
<html>
<head>
<title>page1</title>
</head>
<body>
</body>
</html>
page2.html
<html>
<head>
<title>page2</title>
</head>
<body>
</body>
</html>
Output
<html>
<head>
<title>Horizontal Frames</title>
</head>
<frameset cols="30%,70%">
<frameset cols="25%,50%,25%">
<frame src=page1.html>
<frame src=page2.html>
<frame src=page3.html>
</frameset>
<frameset cols="25%,50%,25%">
<frame src=frame1.html>
<frame src=frame2.html>
<frame src=frame3.html>
</frameset>
</frameset> </html>
<noframes> tag:
When the browser does not support frameset use <noframes> element to indicate to users that the browser
does not support frames. The <noframes> element is ignored that handle frames.
Example
<html>
<head>
<title>Vertical Frames</title>
</head>
<frameset cols="30%,70%">
<frame src=on.html>
<frame src=two.html>
</frameset>
</html>