History of HTML

History of HTML

  • Initially work on HTML was started in 1989 by Tim Berners Lee.
  • In 1995, HTML 2.0 was published by IETF (Internet Engineering Task Force). HTML 2.0 is the first standard HTML specification.
  • In 1997, HTML 3.2 was published by W3C (World Wide Web Consortium).
  • In 1997, HTML 4.0 was published by W3C. It provides three variations: strict, transitional and frameset.
  • In 1999, HTML 4.01 was published by W3C.
  • HTML 5 was published in October, 2014

HTML Values and Units

HTML Syntax


The basic syntactic units in any HTML document are: tags, elements and attributes. HTML describes information in a web document with the help of tags, which provide a way for marking the text. The syntax of a tag is shown below:

< tag-name > 

For example, using HTML, we can display paragraphs in a web document using the <p> tag. Every browser will have default presentation effects for each tag. Almost all of the tags are written in pairs (a opening tag and a closing tag) as shown below:

< tag-name > content here…. </ tag-name > 

In HTML, the content in a web document is described using the tags. The collection of content and the enclosing tags is known as an element. For example, a paragraph element looks as shown below:

<p> This is a paragraph… </p> 

In general, all tags in HTML support attributes using which additional information is specified to the browser to render the content of the element. For example, an old way of aligning the text in a paragraph to the center of the document is shown below:
<p align=”center”>This is a paragraph…</p> 

In the above example, align is the attribute-name and center is its value. General syntax for writing attributes is:

attribute-name = “value”

Text and Comments

HTML comments can be used by the developer of the web pages to document certain sections in the web page. A comment in HTML should be written as follows:

<!–  Your comment here.  –>

Comments are generally used for short text, not for commenting out large sections of HTML code. The text included in the comments is not visible to the user.

CDATA Sections


For larger comment sections, CDATA (character data) sections can be used. CDATA structures are also useful in XML and XHTML. The format for the CDATA tag is as follows:

<![CDATA[   Commented text goes here.  ]]>
Both comments and CDATA tags cannot be nested.

The term CDATA is used about text data that should not be parsed by the XML parser. Characters like “<” and “&” are illegal in XML elements. “<” will generate an error because the parser interprets it as the start of a new element. “&” will generate an error because the parser interprets it as the start of a character entity.

Some text, like JavaScript code, contains a lot of “<” or “&” characters. To avoid errors, script code can be defined as CDATA. Everything inside a CDATA section is ignored by the parser. A CDATA section starts with “<![CDATA[” and ends with “]]>“. 

netaji gandi Thursday, November 21, 2019
Introduction to HTML

Introduction to HTML

HTML is a mark up language used to describe the content in a web document. HTML (HyperText Markup Language) was defined using SGML (Standard Generalized Markup Language) which is an ISO (International Organization for Standardization) standard for describing text-formatting languages.

One must remember that HTML is not a programming language. A file with HTML code is saved with .html extension.

A web page (web document) is a document which contains many elements like text, audio, video, images, flash animations etc. The web pages are generally stored on a server and a user requests these web pages by using a web browser.

Web documents are created using different technologies. Among them HTML plays a crucial role. Every web page is made up of HTML and other technologies like CSS, Javascript etc.

HTML is responsible for telling a web browser (Ex: Microsoft Internet Explorer, Firefox, Chrome, Safari, Opera etc…) how text and other objects (like video, images etc…) should appear in a web browser.

Whether the text should be small, large, bold, underlined, left aligned or right aligned is determined by the HTML in the web page.

HTML is not a programming language like C, C++, Java etc. It is a markup language.

HTML is a markup language which describes the content in web pages.

A user is concerned with only the content in the webpage. User doesn’t worry about the HTML which makes the browser understand the content in a webpage. HTML is hidden from the user. However, as a creator of web pages, he or she should have knowledge about HTML and its uses.

Hypertext


The hypertext in HyperText Markup Language refers to the text in a web page which contains links to other web pages. When a user clicks on a link, the user gets redirected to another web page. This term was coined to describe documents that could change, redirect and otherwise overcome the linearity of normal text.

Markup


Writing explicit editing instructions in or around text is generally known as marking up text. While creating web pages, we use markup (tags) which specifies the browser how it should display the text (bold, underline, big text etc…).

In the early 1990’s a new language was created, Hypertext Markup Language, or HTML. The language was created to provide a way for developers to mark up documents so web browsers could display certain elements in bold, underline or in italics etc.

Several requirements must be considered when telling a computer how to format text. Following are some of the requirements for a markup language:
  • The instructions should follow a stringent set of guidelines (syntax).
  • The instructions should be included in a textual document.
  • The instructions should be invisible to the end user.
  • The instructions should tell the display program (generally a web browser) where to start and where to end, and how to apply the formatting specified.

The HTML markup instructions are delimited with angle brackets (< >) also known as less than and greater than symbols. The markup instructions are made of angular brackets and a keyword. These markup instructions are known as tags.

In HTML there are opening tags and closing tags. An opening tag specifies the beginning of formatting and an end tag specifies the end of formatting. For example to underline text in a web page we should use <u> and </u> tags. All the closing tags begin with a / followed by the keyword.

netaji gandi
HTTP Protocol

HTTP Protocol

All web communications use the same protocol HTTP. Latest version of HTTP is 1.1 released in 1999. A HTTP communication consists of two phases: a request (from client to server) and a response (from server to client).

In both the request and response phases, the unit of communication contains two parts: one is the header and the other is the body part.

The format for a HTTP request is shown below:
HTTP-request-method  Resource-path  HTTP-version
Header fields
Blank line
Body of the request

According to HTTP 1.1 there are several request methods, among which some important methods are listed below:

Among the HTTP request methods mentioned above, GET and POST are the most frequently used methods. After the first line, the request message contains request header, which contains different fields known as the header fields. Each header field is a key-value pair. The format of a header field is header field name followed by a colon and a value.
Some of the frequently used header fields are: Accept (which specifies the MIME types supported by the browser), Host (which specifies the name of the host), Content-length (which specifies the no of characters in the body of the request message).

Below is an example which shows a live example of HTTP request message and HTTP response messages:
The general format of a HTTP response is shown below:

Status line
Header fields
Blank line
Body of the response

The status line contains information like HTTP version, Status code and Short message corresponding to the status code. Well known status codes and corresponding status messages  are 200 (success), 301 (redirection), 404 (Page not found) and 500 (Internal server error).

After the first line (status line), a response message contains a set of fields which is known as the response header. Frequently used fields in the response header are: Server (which specifies information about the web server), Last-modified (which specifies the date on which the requested resource was last modified), Content-length (which specifies the length of the content in the body of the response message) and Content-type (which specifies the MIME type of the content in the body part of the response message).

Difference between HTTP GET and POST:

Although the HTTP and GET and POST can be used to send requests (data) to a web server, there are some subtle yet, important differences between them which are specified below:
  • The data sent through GET request can be seen by the user in the address bar of the browser, as the data will be sent as a query string. In a POST request, the data sent by the user is hidden.
  • HTTP GET is less secure (refer to the first difference) when compared to HTTP POST.
  • Web servers will have limited buffer size (typically 512 bytes) for receiving the query string sent by the user using HTTP GET. If data sent by the user exceeds the buffer size, the data may be truncated or the server might crash or the server might be led to run some hidden code as part of the query string data. The last case is the so-called buffer overflow problem, a common way used by the hackers to take control of the servers and spread virus and worms. There are no restrictions on the amount of data that can be sent using HTTP POST.

netaji gandi
Uniform Resource Locator

Uniform Resource Locator


The resources provided by the web servers are identified through Uniform Resource Locators (URLs). The format of an URL is shown below:
Above URL is an example for identifying resources through HTTP protocol which is generally used to request and send XHTML (eXtensible HTML) pages. The default port for HTTP is 80. If the web server uses any other port, it should be appended at the end of the domain name.

Like http, we have file scheme which denotes that the resource is available on the local host or system. If we want to access a file on the local host it is sufficient to write file:///path_to_file.

URLs are of two types. First one is absolute URL, where the entire path including the domain name is specified. Second one is relative URL, where the domain name is skipped and the rest of the path is specified. For example, the domain name is www.xyz.com and the document root contains the folder images. The images folder contains a file named sun.jpg.

Considering that the image file (sun.jpg) is being referenced from another file in the document root, the absolute URL for sun.jpg will be http://www.xyz.com/images/sun.jpg and the relative URL will be images/sun.jpg.

netaji gandi
Web Architecture


A typical web application contains four tiers as depicted in the diagram below. Web browsers on the client side render documents marked up in HTML.

A web server for processing and sending the data to the web browsers. An application server that computes business logic and a database server program to store and retrieve data in a database.

These three types of server programs (web server, application server and database server) may run on different servers or on the same server (machine).
Web browsers can run on most of the operating systems with limited hardware or software requirements. They provide the graphical user interface for the clients to interact with the web applications. A web browser provides the following features:
  • Interpret HTML markup and present the documents to the user.
  • Support hyperlinks in HTML documents.
  • Use HTML forms and HTTP protocol to send requests and data to the web server and download documents.
  • Maintenance of cookies.
  • Support plug-ins to support extra functions like: audio-video files, running java application and flash animations.
  • Implement a web browser sandbox policy. A sandbox prevents software components like applets, java scripts and ActiveX running inside a web browser from accessing the files and other resources on the local client system.

The web server’s main functionality is to retrieve and send data to the web browsers through HTTP requests. The response of a web server is a HTML document or other web documents. If the client requests a static HTML page, the web server retrieves the page from its hard disk and sends it back.
If the client requests a dynamic page, the web server uses its extensions (the green box in the diagram) like servlets, JSP or other technologies to generate the dynamic content. This may involve sending and retrieving data from the database.

The application server is responsible for computing the business logic of the web application, like carrying out a bank account fund transfer and computing the shortest route from one city to another. If the web application is only accessed or used by a small group of people, the application server will be absent and the business logic will be computed by the server extensions (Servlets, JSP, PHP etc…).

But for a large web application like Facebook, a separate application server will take advantage of a separate hardware server machine to run business logic more efficiently. This is a good application of divide-and-conquer methodology.
Difference between web server and application server:

Factor / Type of server
Application Server
Web Server
DefinitionAn application server is a software framework that provides an environment in which applications can run, no matter what the applications are or what they do.Web server can refer to either the hardware (the computer) or the software (the computer application) that helps to deliver content that can be accessed through the Internet.
What is it?A server that exposes business logic to client applications through various protocols including HTTP.A server that handles request through HTTP protocol.
JobApplication server is used to serve web based applications and enterprise based applications(i.e sevlets, jsps and ejbs…). because application server contains web server internally.Web server is used to serve static web documents.
FunctionsAn API,Object life cycle management,
Session management,
Resource management (connection pooling),
Load balancing etc…
Keeping HTML, PHP, ASP etc files available for the web browsers to view when a user accesses the site on the web, handles HTTP requests from clients.
ExamplesSun Java Application server, Weblogic server, Apache Geronimo, IBM WebSphere Application Server, Glass Fish Server, Apache TomcatApache HTTP Server, Microsoft IIS, Jetty
ClientsGUI’s, Web ServersWeb browsers, search engine robots
Adds functionality?YesNo, does not add any functionality.
SupportsServlets and JSPOnly static content
Resource utilizationLowHigh

netaji gandi
Web Browsers and Web Servers
Web browsers and web servers are the communicating client-server programs for distributing documents and information, generally known as web data, over the Internet (Interconnected Network).

Web data is marked up using HTML language for presentation and interaction with people in web browsers. Each web server uses an IP along with a port number or a domain name for its identification.

Web Browsers


The communication model that the Web (WWW) and Internet follows is the client-server model. Below figure illustrates the client-server model:
In the client-server model, a client, generally a web browser sends requests to one or more servers. A request might be for a web page or to execute an application directly on the server.

Web browser is a software application which runs on the client machine and sends requests to the server. It is named after its functionality of browsing the web pages.

A web browser supports many protocols among which the most general supported protocol is HTTP (HyperText Transfer Protocol) which allows the client and server to communicate with each other.

The first web browser with a Graphical User Interface (GUI) was Mosaic developed in 1993. Popular web browsers at present are Google Chrome, Mozilla Firefox, Internet Explorer, Opera, Safari etc.

Web Server


A web server is a software application which accepts requests from the clients, process them and send a response back. All the communications between a web browser and web server are carried out through HTTP.

In general, a web server monitors a port on its host machine for HTTP requests from clients, performs operations and returns responses back to the clients.

Besides the underlying hardware and operating system, all the web servers share the same characteristics. The file structure of a web server contains two separate directories known as document root and server root.

The document root contains the web documents (web pages) that will be served as responses to the client’s requests and the server root contains the server and its support software.

Many servers allow multiple web sites to be maintained on a single computer which decreases the cost of each website and its maintenance. Such secondary hosts are known as virtual hosts. Some servers can serve documents that are in the document root of another server. Such servers are known as proxy servers.

Apache web server, IIS (Internet Information Services), nginx and GWS (Google Web Server) are the popular web servers. IE, Firefox and Chrome are the popular web browsers.

netaji gandi
Introduction to WWW
In 1989 a small group of people led by Tim Berners-Lee at CERN (European Organization for Nuclear Research) proposed the idea of World Wide Web(WWW) where the scientists across the world can share scientific documents irrespective of the underlying equipment. In 1991 WWW was practically implemented and released to the public.

The basic units of information in the WWW are documents or pages or resources. The documents contain text known as hypertext. Hypertext is text which can link to other documents on the Web. Primarily the documents shared through Internet using WWW used to contain text only. Later, images, audio, video and other forms of content were also included. This collection of content in a document is known as hypermedia.

World Wide Web and Internet same or different?
It is important to know that the Internet existed even before WWW was invented. Internet is a collection of computers and other devices which allows them to communicate with each other. WWW is a collection of software and protocols available on almost all of the computers in the Internet. Internet was useful through telnet, FTP, mailto and other protocols even before the invention of WWW. WWW just made it easier to access the services through Internet.

Security Concepts

Security in the web relate to protecting your sensitive data (like passwords, credit card numbers, PINs etc) from being accessed or manipulated by the people whom you think are not deemed to do so.

Most of the security concerns arise due to the vulnerabilities in the Internet and related technologies. To understand what are the security issues, consider an example of a transaction where you send your username and password to login to a website.

Security issues for this transaction are as follows:

Privacy – It should not be possible for a third-party to steal your data while it is being sent to a server.

Integrity – It should not be possible for a third-party to modify your data before reaching the server.

Authentication – Both sides of the communication should be able to identify each other’s identity.
Non-repudiation – Both sides must be able to prove legally that the message was sent and received.

First two issues, privacy and integrity can be supported by using encryption which is way to convert human readable information to non-human readable. There are several algorithms widely available for encryption among which the popular ones are RSA, DES, AES and Triple DES.

There is another dimension which raises various problems regarding the security of the data. It is through malicious programs. Hackers (people with evil intensions) create malicious programs known as viruses, worms, time bombs and others.

A virus is a malicious program which is transmitted through attachments of an e-mail or as a part of a software download that when executed on the victim’s computer, attaches itself with the other programs and makes them unusable or deletes data available in the memory or hard disk.

A worm, unlike a virus, has the ability of self propagation. Viruses and worms allows an attacker to gain control of the victim’s computer which in turn are used as a part of attacks known as DoS (Denial of Service) attacks.

netaji gandi

Internship offering Organizations

 Internship offering Organizations https://www.iitg.ac.in/dsai/docs/flyer/sum_intern_call2026_iitg_dsai_details.pdf  https://www.indiascienc...