HTML and CSS Reference
In-Depth Information
You might notice here that the tags are nested. That is, both <body> and </body> tags go
inside both <html> tags; the same with both <head> tags. All HTML tags work this way,
forming individual nested sections of text. You should be careful never to overlap tags.
That is, never do something like the following:
<!DOCTYPE html> <html>
<head>
<body>
</head>
</body>
</html>
Whenever you close an HTML tag, make sure that you close the most recent unclosed
tag. (You learn more about closing tags as you go on.)
NOTE
In HTML, closing some tags is optional. In HTML 4.0 and earlier,
closing tags were forbidden in some cases. HTML standards that
require your markup to be well-formed XML (like XHTML 1.0)
require that all tags be closed. If you're just learning HTML, this
won't be a big deal. If you already have a passing familiarity with
the language, however, this might surprise you. The examples
shown in this topic display the proper way to close tags so that
older browsers will interpret XHTML 1.0 closures correctly.
The Title
Each HTML page needs a title to indicate what the page describes. It appears in the title
bar of the browser when people view the web page. The title is stored in your browser's
favorites (or bookmarks) and also in search engines when they index your pages. Use the
<title> tag to give a page a title.
<title> tags are placed within the <head> tag and normally describe the contents of the
page, as follows:
<!DOCTYPE html> <html>
<head>
<title> The Lion, The Witch, and the Wardrobe </title>
</head>
<body>
...your page...
</body>
</html>
 
 
Search WWH ::




Custom Search