1.1 History of HTML

Nowadays, almost all people use the Internet. Read articles, use a browser, follow links. And only a few of them are wondering when and by whom was the Internet invented?

It still depends what you call the Internet. Most often, the layman means one thing, and the technician means another. The computer network connecting the world's largest data centers was created back in the 70s. But the Internet accessible to an ordinary person (browser, links, all sorts of pages) was invented by one person in the early 90s . And it was like this...

In the early 1990s, Briton Tim Berners-Lee invented the Internet. Although, nevertheless, what he invented is more correctly called the Web:, World Wide Webhe is www, he is also the World Wide Web. Yes, one man invented the World Wide Web.

From 1986-1991 he worked at the CERN Research Center (in Geneva, Switzerland) on a new scientific documentation standard. You see, it is customary for scientists to publish scientific papers in the form of articles, and at the end of the articles to indicate the list of used literature. In other words, scientific knowledge is a list of articles with links to each other.

By the way, modern Wikipedia very much resembles how its creator saw the World Wide Web : scientific articles with links to each other, a list of sources and literature used. And if Tim was lucky, then the web would still be like this. But on the way to a brighter future, the world took a wrong turn somewhere :)

The web is based on three technologies:

  • HTML-page, which contains text, pictures, and links to otherHTML-pages.
  • • A browser that displays HTML-pagein the most human-friendly way.
  • • Protocol http- a standard for web servers to communicate with browsers and each other.

Tim Berners-Lee didn't so much invent these things as he standardized them. HTML- was created on the basis of the standard SGML. Tags were also borrowed from there. But the world's first web browser called WorldWideWebTim wrote himself, and back in 1990.

1.2 HTML is not a programming language

HTMLit is not a programming language and never has been. Never say that. Even if you will write a resume, never indicate HTMLin the programming languages ​​section, only in the Tools (technology) section. It would be a gross mistake to write in your resume that you know a programming language HTML. Why?

And the thing is that HTMLit is a markup language for documents. If we simplify it very much, then HTML-documentit is a text (document) with pictures, tables, links, etc. inserted into it.

Let's say you want to write an article that will:

  • Title of the article (title).
  • The article itself, consisting of one paragraph.
  • Picture.
  • A few important statements you want to put in bold.
  • In the middle of the article, provide a link to some useful information.

Here is how this document will look in the browser:


domestic cat

From the point of view of scientific taxonomy, the domestic cat is a mammal of the cat family of the carnivora order. Often, a domestic cat is considered as a subspecies of the forest cat, however, from the point of view of modern biological taxonomy (2017), the domestic cat is a separate biological species .


Pretty good, right? And the standard HTMLallows you to make this document readable for both humans and computers. Here's what it looks like in HTML-standard:

<h1> Domestic cat </h1>

From the point of view of scientific taxonomy, the domestic cat is <a href=”/”> a mammal </a> of the cat family of the carnivora order. Often, a domestic cat is considered as a subspecies of the forest cat, however, from the point of view of modern biological taxonomy (2017), the domestic cat <b> is a separate biological species </b> .

<img src=”cat.jpg”>

Special tags were added to the text of the article (highlighted in red ), which are understood by both a person and a computer (browser). The browser can display the article beautifully for the reader, and the author of the article can easily edit it.

1.3 The emergence of the HTTP protocol

The abbreviation HTMLstands for Hyper Text Markup LanguageHypertext Document Markup Language. Hypertext is a document consisting of pages that link to each other. What is it http?

HTTPstands for Hyper Text Transfer ProtocolHypertext Transfer Protocol (standard). httpor httpsyou can see in the address bar of the browser if you try to copy the link to the open page.

A typical page link looks like this:

http://google.com/logo.jpg

At the very beginning of the link is the name of the protocol, followed by a colon and two forward slashes. Tim Bernes-Lee once said in one of his interviews that if he knew that the protocol httpwould be so popular, he would have come up with something shorter. (after all, almost all links in the world begin with the word http://or https://)

Let's get back to browsers. When a browser requests html-page, it sends a text file (request) to the server and receives another text file (response) in return. This mode of operation is called client-server.

First, there are lines with key information, then with service information. The first line of the text query is given by the template:

MethodURI  HTTP/Version

CodeGym user's personal page is given by the link

https://codegym.cc/me

http-requestbrowser for it looks like this:

GET /me  HTTP/1.0 
Host: codegym.cc

As a response, the server will most likely send

HTTP/1.0 200 OK
<html>page text...

The first line in the response text is the http protocol version and the response status (200, OK) . Then comes an empty line and then just in text form comes the one html-pagethat the browser requested. Everything is very simple :)