Secret Elements

As we wrap up this introduction to HTML, I want to show you some elements that... don't really affect much, but are still very important to know about.

The entire script for this page is contained inside an element called body, which itself is contained inside another element called html. You should see the opening tags at the top of the script, and the closing tags way at the bottom, with everything else indented in-between.

In the original specification for HTML, these elements were required to be present in all HTML documents. In fact, they're still required... but now they're also implicit. That means that these elements are always there, whether you write them explicitly or not. Every web page is contained inside these hidden elements. There is no escape!

We've been making web pages all along without caring about these elements, so what's the point? In the next chapter, I'll show you how to change the colors of elements, and if you want to change the background color of the entire page, these are the elements you'll need to change!

While I'm at it, I'd like to show you one more special tag that doesn't actually do anything. It's called a "comment", but it looks very different from other tags. It needs to start with <!-- and end with -->, and everything in between has no effect on the page. The purpose of comments is to write notes to yourself and anyone else who reads your script. See the example in the script under here.

There is plenty more to learn about HTML, but by now you know enough to be dangerous! For the next chapter of this tutorial, we're going to focus on a single new element that changes everything...