WT Unit-1
WT Unit-1
WT Unit-1
Internet-Based Services
What is WWW?
WWW stands for World Wide Web. A technical definition of the World Wide
Web is − All the resources and users on the Internet that are using the
Hypertext Transfer Protocol (HTTP).
A broader definition comes from the organization that Web inventor Tim
Berners-Lee helped found, the World Wide Web Consortium (W3C): The
World Wide Web is the universe of network-accessible information, an
embodiment of human knowledge.
In simple terms, The World Wide Web is a way of exchanging information
between computers on the Internet, tying them together into a vast collection
of interactive multimedia 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
What is 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 protocol specifies how information is transferred from a link. The
protocol used for web resources is HyperText Transfer Protocol (HTTP).
Other protocols compatible with most web browsers include FTP, telnet,
newsgroups, and Gopher.
The protocol is followed by a colon, two slashes, and then the domain name.
The domain name is the computer on which the resource is located.
Links to particular files or subdirectories may be further specified after the
domain name. The directory names are separated by single forward slashes.
What is Website?
Web Browsers are software installed on your PC. To access the Web you
need a web browsers, such as Netscape Navigator, Microsoft Internet
Explorer or Mozilla Firefox.
Currently you must be using any sort of Web browser while you are
navigating through my site tutorialspoint.com. On the Web, when you
navigate through pages of information this is commonly known as browsing
or surfing.
Protocols of Internet:
9. Telnet
10. Gopher
4. Post office Protocol (POP): POP3 is designed for receiving incoming E-mails.
6. File Transfer Protocol (FTP): FTP allows users to transfer files from one
machine to another. Types of files may include program files, multimedia
files, text files, and documents, etc.
9. Telnet: Telnet is a set of rules designed for connecting one system with
another. The connecting process here is termed as remote login. The
system which requests for connection is the local computer, and the system
which accepts the connection is the remote computer.
HTML
HTML (Hypertext Markup Language) is the only markup language for
creating web pages. It provides some titles, headings, paragraphs, lists,
tables, embedded images, etc., to describe the structure of text-based and
multimedia information in HTML documents.
HTML is the first language of web designing. CSS is also used along with
HTML to improve web page design further. JavaScript is used with HTML to
make web pages dynamic.
You can write HTML in any simple editor such as Notepad. And other
software such as Adobe Dreamweaver, Sublime, NetBeans, Notepad ++,
etc., are mainly used for writing and editing HTML.
".html" or ".htm" are the two extensions used to write and save HTML files;
we can write HTML code in any text editor and save it as "filename.html" or
"filename.htm".
HTML editors
There are so many software packages available to develop HTML. The
software packages can be grouped into two main categories:
WYSIWYG editors
Because WYSIWYG (pronounced wuzzywig or wizzywig) HTML editors do not
require much HTML knowledge, they tend to be expensive. These editors
allows you to directly work in the "design" or "preview" view instead of the
code view. The main advantage of working with the design view is that you
can design the layout of your page by dragging-and-dropping pieces of your
page layout. Thus a web page can be developed more quickly than by hard-
coding it by hand using a text-based editor.
1. Macromedia Dreamweaver
2. Microsoft FrontPage
3. Adobe GoLive
Remember these editors can help you create web pages but they cannot
teach you HTML. If you first master HTML, you will utilize these software
packages more efficiently.
1. Document Content
2. Tags
Document content is the information on a web page that the user will see.
That information could be text or graphics, for example. As you start creating
your own web pages, try finding out first what information you want to display
and how you want to present it.
Tags are the HTML codes that control how the document content will appear.
The tags, in other words, will determine whether the text will be bold, black or
blue, or of font type Time New Roman or Airal.
Naming conventions
HTML files names are very important as they are used to locate or open the
files. Remember these points when naming HTML files:
1. Save your web page files with the .htm or .html file extension. (Both of
these files represent HTML files, older systems such Windows 3.1 and
DOS cannot recognize four-letter file extensions. Because the first
three letters of .html and .htm are the same, those systems ignore the
"l" and just recognize ".htm".)
2. Some web servers are case-sensitive. That means those web servers
would consider page1.htm and Page1.htm as two different files. To
avoid case sensitivity problems, use only lowercase or uppercase
letters to name your files.
3. Filenames should consists only of letters and numbers. Avoid using
spaces, punctuation, or special characters. If you need to separate
words, use hyphen (-) and underscores (_), for example, creating-an-
HTML-document.htm or creating_an_HTML_document.htm.
1. head. The head element contains title and meta data of a web
document.
2. body. The body element contains the information that you want to
display on a web page.
* To make your web pages compatible with HTML 4, you need to add a
document type declaration (DTD) before the HTML element. Many web
authoring software add DTD and basic tags automatically when you create a
new web page.
In a web page, the first tag (specifically, <html>) indicates the markup
language that is being used for the document. The <head> tag contains
information about the web page. Lastly, the content appears in the <body> tag.
The following illustration provides a summary.
head body p
Examples of elements of structure of a document
<head><body><p>
Examples of elements as tags
an element becomes a tag when we use the angled brackets around it. To
create a web page, we use tags. A tag instructs the browser what specific
instruction to execute. Assume in your web page you want to emphasize
some text as bold. To do this, HTML requires three pieces of information from
you:
1. With what tag do you want to emphasize the text? (Answer to this
question determines what and where a specific HTML instruction will
begin. In other words, this starts an HTML instruction.)
2. What text do you want to make bold?
3. Where do you want to stop the instruction? (An instruction should be
ended with the same tag that started the instruction. See below.)
As an example, assume you want markup "World Wide Web Consortium" bold:
The World Wide Web Consortium (W3C) is a rule-making body for the Web.
1. we will use the <b> tag. Think of this as turning ON the bold feature in
HTML.
2. we want to display "World Wide Web Consortium" as bold. Remember
this text must be immediately following after the <b> tag.
3. stop the instruction with </b> tag. This will turn OFF the bold feature of
HTML.
So our HTML markup will become:
The <b>World Wide Web Consortium</b> (W3C) is a rule-making body for the
Web.
Most elements in HTML have three parts: start tag, content, and end tag.
The start tag is simply the element name surrounded by the angled brackets
such as <b>, <body>, and <p>. The end tag is a element name surrounded by
</ and > such as </b>, </body>, and </p>. In other words, an end tag simply
has the forward slash (/) before the element name. So if you open (start) a tag
with <i>, you will close (end) it with </i>.
Understanding attributes
In HTML, elements (or tags) have attributes or properties. As an HTML writer,
attributes allow you to add extra instruction to your tags. Because each tag
has its own unique attributes, you have to learn which attribute(s) belongs
which tag. (See the attributes reference table for details.) Any attribute cannot
be just applied to any tag. Think of attributes as options. As such, options can
only be applied to tags if the tags offer those options. If you incorrectly apply
an option to a tag, the browser is likely to ignore that option.
An attribute has two parts: attribute name and attribute value. Because of
these two-parts, they are also referred to as pairs. The attribute
name identifies (or defines) what special instruction you want to add to a
particular tag. The attribute value, on the other hand, indicates (usually
predefined) option for that attribute. So if you are going to use an attribute,
you will need to have value for that attribute. Let's go over the actual HTML.
This is my paragraph. Normally, text and other object on a web page are left-
aligned. Because this paragraph has an extra instruction (align="right") to
start this particular paragraph from the right, the paragraph is right-aligned.
The following shows the HTML code for the top paragraph:
Attributes are specific to tag names. For example, for the <p> tag, you
can use the align attribute but not the width attribute. The width
attribute can only be used with tags such as <table>, <td>, and <img>.
Attributes have values. Make sure to use the correct value for the
correct attribute. For instance, you should not use color="20", or
align="brown"; instead use, color="red", and align="justify".
Attribute values needs to be enclosed in double quotation marks. This
is true especially if the value contains one or more spaces, for example,
face="Times New Roman".
Attribute values could come from a predefined list (such as color
names red, green, blue, etc.) or from you (width of a table 50% or 800
pixels.)
As you first start working with HTML, you may start by adding comments to
every single line to remind you of what the code does. As you develop more
experience and gather more knowledge about HTML, you will learn to
comment only major parts of your web page. You may, for example, comment
the width of nested tables you are using in your web page:
Examples of comments in HTML
In HTML, a comment begins with <!-- and ends with -->. Any text you place
after <!-- is comment. Browsers ignore comment text. Again, comment is for
your reference; it does not get displayed on the web page. In a comment, you
can freely include special characters, such as ampersands, quotation marks,
and angle brackets. Your comments can also span multiple lines. The
browser will stop ignoring text once it reads -->.
<!--This comment is long. It is displayed on more than one line. Adding multi-
line comments in HTML is easy as adding a single line comment. Whether the
comment is single line or multi-line, it starts with <-- and ends with -->-->.
History of HTML
HTML was created by Sir Tim Berners-Lee in late 1991 but was not released
officially, published in 1995 as HTML 2.0. HTML 4.01 was published in late
1999 and was a major version of HTML.
HTML is a very evolving markup language and has evolved with various
versions updating. Long before its revised standards and specifications are
carried in, each version has allowed its user to create web pages in a much
easier and prettier way and make sites very efficient.
HTML 1.0 was released in 1993 with the intention of sharing information
that can be readable and accessible via web browsers. But not many of the
developers were involved in creating websites. So the language was also not
growing.
Then comes the HTML 2.0, published in 1995, which contains all the
features of HTML 1.0 along with that few additional features, which
remained as the standard markup language for designing and creating
websites until January 1997 and refined various core features of HTML.
Then comes the HTML 3.0, where Dave Raggett who introduced a fresh
paper or draft on HTML. It included improved new features of HTML, giving
more powerful characteristics for webmasters in designing web pages. But
these powerful features of new HTML slowed down the browser in applying
further improvements.
Then comes HTML 4.01, which is widely used and was a successful version
of HTML before HTML 5.0, which is currently released and used worldwide.
HTML 5 can be said for an extended version of HTML 4.01, which was
published in the year 2012.
To create the above paragraph, you would write the following code:
<html>
<title>How To Create Paragraph</title>
<body>
<p>To learn HTML and other web programming languages, come to
ScriptingMaster.com regularly. The web site is updated daily with new content.
The web site is succeeding because visitors like you keep coming back and
find the site simple to use, easy to understand, and resourceful.</p>
</body>
</html>
If you want to change the normal alignment of the text, you can use
the align attribute. With the attribute, you could use one of these values:
1. left
2. right
3. center
4. justify
Left alignment
To align text to the left margin, set the align attribute to left:
This paragraph uses the left alignment. If a language is read from left to right
and the browser is set to that language, the default alignment is left. When the
text is aligned automatically to the left, use of the align attribute with the
value left is not necessary.
Right alignment
To align text the right margin, set the align attribute to right:
Center alignment
To change the alignment of the text to the center of the page, set
the align attribute to center:
This paragraph uses the center alignment. Aligning text center is easy: simply
set the align attribute to center or use the <center> tag.
Justified alignment
When you want to continue the text to the right and left margins, set
the align attribute to justify:
This paragraph uses the justify alignment. The paragraph is justified: the text
continues to both margins.
As you work with these tags to style your text in different ways, you will
discover that there is not really big difference how the text is displayed on a
browser. For instance, you can italicize your text using the <i> tag (a physical
character tag) or <em> tag (a logical character tag). Why does that make any
difference? It depends on whether you are using italics for the sake of using
italics or whether you are using italics to convey some special meaning. While
a physical character tag controls how to format the text, a logical character
tag describes how the text is being used, without regard to how it should be
formatted. Thus a logical style would be used to convey some meaning while
a physical style would not.
Physical styles
As mentioned above, a physical character tag controls how the characters are
formatted. For instance, you might display some characters as bold or italic.
Listing 1 displays some common physical character tags.
* Both <s> and <strike> tags are deprecated in HTML 4.0 so instead use
the <del> tag.
H<sub>2</sub>O H2O
May 5<sup>th</sup> 2005 May 5th 2005
Logical styles
A logical character tag describes how the text is being used, not necessarily
how it is formatted. Listing 3 displays common examples logical character
tags.
<del> deleted text displays text with a line through it; renders
differently in Netscape and Internet Explorer
Note that both logical and physical tags are two-sided tags (requiring an
opening and closing tag). Also, the character tags can also be nested to
format some text as
When you nest tags, make sure to closed them properly. Although the output
of the following code is same, the tags are not closed properly:
Do you notice why? Well, because the tags are overlapped: the <i> tag should
be closed first because it was the last tag that was opened. The <b> tag
should be closed last as it is the first tag that is opened. In general, a tag that
is opened last, should be closed first. A tag that is opened first should be
closed last.
Creating headings
There are six headings in HTML. Each heading can be created with an HTML
header tag, one header tag for each level of heading. Header tags are range
from <h1> to <h6>, where <h1> is the largest and most prominent and <h6> is
the smallest. To use a header tag, use the following syntax:
<hn>Some text</hn>
where n is a number between 1 and 6.
Figure 1 shows how to use all of the six headings as an HTML code on the left
and the output from a browser is shown on the right.
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>
Definition list
The definition list is used far less frequently than the other two kinds of lists mentioned
above. A definition list, as the name implies, is used for listing definitions:
Line breaks
To add a line break in a web page, you can use the <br> tag. Typing a <br> tag in your
HTML code is similar to pressing the ENTER or RETURN key in a word processor. The
effect of <br> tag is that the browser stops printing text on that line and drops down to
the next line on that page. The <br> tag does not require a closing tag. The following
shows an example:
instructs the browser to start a new line after the word "breaks" because after this word
the tag <br> is placed. Thus the output of the above code is:
Line breaks
in HTML
To add multiple line breaks in a row, simply use the <br> tag for each line you want to
stop and start. For instance,
inserts three line breaks after the word "breaks". The following shows the output of the
above code:
Line breaks
in HTML
Preformat text
With the <pre> tag, the text renders in the browser exactly as you type it. The <pre> tag is
short for preformat. So if you press the ENTER or RETURN key several times to create
line breaks within a <pre> tag, you can expect to see all those line breaks in a browser.