Hypertext Markup Language (HTML)
- By Rob Miles
- HTML and the World Wide Web
- What is HTML?
- Making active web pages
- Egg timer
- An image display program
- What you have learned
What you will learn
HTML and the World Wide Web
What is HTML?
Making active web pages
Work with object properties
Investigate the egg timer
An image display program
Create your own pages
What you have learned
HTML and the World Wide Web
The first version of a Hypertext Markup Language (HTML) was created in 1989 by Tim Berners-Lee. He wanted to make it easier for researchers to share information. At the time, research reports were written as individual documents. If a document you were reading contained a reference to another document, you would have to go and find the other one. Tim Berners-Lee designed a system of computer servers to share electronic copies of documents. A document could contain hyperlinks to other documents. Readers used a browser program to read the document from the servers and follow the links from one document to another. These documents are called hypertext documents, and the language that described their contents is called the Hypertext Markup Language, or HTML.
Tim Berners-Lee also designed a protocol to manage the transfer of HTML-formatted documents from the server into the browser. This standard is called the Hypertext Transfer Protocol, or HTTP. Also, now there is a secure version of this protocol called HTTPS, which adds security to the web. HTTPS allows a browser to confirm the identity of a server, and it also protects messages sent between the server and the browser to prevent eavesdropping. The HTTPS protocol is what makes it possible for us to use the World Wide Web for banking and e-commerce.
In 1990, the first system was released as the “World Wide Web.” The documents that you could download were called “web pages.” The server hosting the web pages was called a “website.” In 1993, Marc Andreessen added the ability to display images in web pages, and the web became extremely popular.
The World Wide Web was designed to be extensible, and for many years, different browser manufacturers added their own enhancements to the standards, leading to problems with compatibility where websites would only work with specific browser programs. Recently, the situation has stabilized. The World Wide Web Consortium (W3C) now sets out standards that are implemented by all browser manufacturers. The latest standard, HTML5, is now very stable and is the version used in this book.
Fetching web pages
The location of the page on a server is given using a uniform resource locator, or URL. This has three elements:
The protocol The protocol is used to talk to the site. This sets out how a browser asks for a web page, and how the server replies. Web pages use HTTP and HTTPS. HTTP stands for “Hypertext Transport Protocol” and HTTPS is the secure version of this protocol.
The host This gives the address of the server on the network. The World Wide Web sits on top of a networking protocol called TCP/IP (Transport Control Protocol/Internet Protocol), and this is the address on that network of the system that holds the website you want to connect to.
The path This is the host’s path to the item that the browser wants to read.
You can see all these elements in the URL that we used to access the hello.html page in Chapter 1 (see Figure 2-1).
FIGURE 2-1 URL structure