Structure

The previous section demonstrates how to create a simple web page. If you haven’t saved this example on your computer as the file simple.html, do so now.

Example 1.2. A Simple Webpage

<html>
  <head>
    <title>A Simple Webpage</title>
  </head>
  <body>
    This is a simple webpage.
  </body>
</html>

If you view simple.html in your browser, you will see the words “This is a simple webpage” on a white or grey background. Where did everything else go? And what are those words with the angle brackets, anyway?

A Brief Introduction to Elements

The web page simple.html uses these elements: html, head, title, and body.

We’ll discuss the general properties of elements in some detail in Elements. For now, let’s focus on the particular elements in the “Simple Webpage” example.

Structure of the Simple Webpage

Although the “Simple Webpage” doesn’t look like much, its elements (html, head, title, and body) are fundamental to the structure of all HTML documents. Here’s what these elements mean:

So why do we only see “This is a simple webpage” when we display simple.html in a browser? The answer is, after you remove all the elements that are not designed to display in the browser window, the sentence “This is a simple webpage” is the only thing left.

In the next section, we’ll tinker with our example webpage, just to see what happens. After that, we’ll provide a more formal definition of elements and element properties.

Further Reading