Sams Teach Yourself HTML, CSS & JavaScript Web Publishing in One Hour a Day

(singke) #1
ptg16476052

66 LESSON 4: Learning the Basics of HTML



Here are some examples:
<!-- Rewrite this section with less humor -->
<!-- Neil helped with this section -->
<!-- Go Tigers! -->

As you can see from Figure 4.4, users can view your comments using the View Source
functionality in their browsers, so don’t put anything in comments that you don’t want
them to see.

Exercise 4.1: Creating a Real HTML Page


At this point, you know enough to get started creating simple HTML pages. You under-
stand what HTML is, you’ve been introduced to a handful of tags, and you’ve even
opened an HTML file in your browser. You haven’t created any links yet, but you’ll get
to that soon enough, in Lesson 6, “Working with Links.”
This exercise shows you how to create an HTML file that uses the tags you’ve learned
about up to this point. It’ll give you a feel for what the tags look like when they’re dis-
played onscreen and for the sorts of typical mistakes you’re going to make. (Everyone
makes them, and that’s why using an HTML editor that does the typing for you is often
helpful. The editor doesn’t forget the closing tags, leave off the slash, or misspell the tag
itself.)
So, create a simple example in your text editor. Your example doesn’t have to say much
of anything; in fact, all it needs to include are the structure tags, a title, a couple of head-
ings, and a paragraph or two. H ere’s an example:

FIGURE 4.4
HTML comments
displayed within
the source for a
page.

Free download pdf