HTML is the standard markup language for creating Web pages.
What is HTML?
- HTML is the standard markup language for creating Web pages
- HTML describes the structure of a Web page
- HTML consists of a series of elements
- HTML elements tell the browser how to display the content
- HTML elements label pieces of content such as “this is a heading”, “this is a paragraph”, “this is a link”, etc.
A Simple HTML Document
<!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <h1>My First Heading</h1> <p>My first paragraph.</p> </body> </html>
- The <!DOCTYPE html> declaration defines that this document is an HTML5 document
- The <html> element is the root element of an HTML page
- The <head> element contains meta information about the HTML page
- The <title> element specifies a title for the HTML page (which is shown in the browser’s title bar or in the page’s tab)
- The <body> element defines the document’s body, and is a container for all the visible contents, such as headings, paragraphs, images, hyperlinks, tables, lists, etc.
- The <h1> element defines a large heading
- The <p> element defines a paragraph
What is an HTML Element?
An HTML element is defined by a start tag, some content, and an end tag:
<tagname>Content goes here…</tagname>
The HTML element is everything from the start tag to the end tag:
<h1>My First Heading</h1>
<p>My first paragraph.</p>
|Start tag||Element content||End tag|
|<h1>||My First Heading||</h1>|
|<p>||My first paragraph.||</p>|
Note: Some HTML elements have no content (like the <br> element). These elements are called empty elements. Empty elements do not have an end tag!
The purpose of a web browser (Chrome, Edge, Firefox, Safari) is to read HTML documents and display them correctly. A browser does not display the HTML tags, but uses them to determine how to display the document:
HTML Page Structure
Below is a visualization of an HTML page structure:
<html> <head> <title>Page title</title> </head> <body> <h1>This is a heading</h1> <p>This is a paragraph.</p> <p>This is another paragraph.</p> </body> </html>
History of HTML
Vannevar Bush was an engineer born at the end of the 19th century. By the 1930s he was working on analog computers and in 1945 wrote the article “As We May Think,” published in the Atlantic Monthly. In it, he describes a machine he called memex, which would store and retrieve information via microfilm. It would consist of screens (monitors), a keyboard, buttons, and levers. The system he discussed in this article is very similar to HTML, and he called the links between various pieces of information associative trails. This article and theory laid the foundation for Tim Berners-Lee and others to invent the World Wide Web, HTML (hypertext markup language), HTTP (HyperText Transfer Protocol), and URLs (Universal Resource Locators) in 1990. Bush died in 1974 before the web existed or the internet became widely known, but his discoveries were seminal.
Tim Berners-Lee and HTML
Tim Berners-Lee, a scientist and academic, was the primary author of HTML, with the assistance of his colleagues at CERN, an international scientific organization based in Geneva. Berners-Lee invented the World Wide Web in 1989 at CERN. He was named one of Time magazine’s 100 most important people of the 20th century for this accomplishment.
Berners-Lee’s was developed in 1991-92. This was a true browser editor for the first version of HTML and ran on a Next workstation. Implemented in Objective-C, it, made it easy to create, view, and edit web documents. The first version of HTML was formally published in June 1993.