HTML and CSS Reference
tab. The document title is also used by search engines like Google or Yahoo! when com-
piling an index of search results.
Indent your markup tags
and insert extra blank
spaces as shown in this
book to make your code
easier to read. These
indentations and spaces
do not affect how the page
is rendered by browsers.
To add a title to your Web page:
1. Click at the end of the opening <head> tag, and then press the Enter key to insert
a new line in your text editor.
2. Press the Spacebar several times to indent the new line of code, and then type
<title>The J-Prop Shop</title> as shown in Figure 1-4.
Specifying the page title
text will appear in
browser title bar
or on browser tab
As you write your HTML fi le, you can add notes or comments about your code. These
comments might include the name of the document's author and the date the document
was created. Such notes are not intended to be displayed by browsers, but are instead
used to help explain your code to yourself and others. To add notes or comments, insert
a comment tag using the syntax
<!-- comment -->
where comment is the text of the comment or note. For example, the following code
inserts a comment describing the page you'll create for Dave's business:
<!-- Sample page for the J-Prop Shop -->
A comment can also be spread out over several lines as follows:
<!-- Sample page for the J-Prop Shop.
Created by Dave Vinet -->
Because they are ignored by the browser, comments can be added anywhere within
the html element.
Adding an HTML Comment
To insert an HTML comment anywhere within your document, enter
<!-- comment -->
where comment is the text of the HTML comment.
You'll add a comment to the jprop.htm fi le, identifying the author and purpose of this