19
CHAPTER
Getting Started with HTML 2
Whitespace and Capitalization
HTML is both whitespace- and case-insensitive. You should
include whitespace in your code to make it more readable, but
it does not impact the display of the page. Element names and
attributes can be written in any case, also without affecting the
page display.
<html>
<head>
<TITLE>My Web Site</title>
</head>
</HTML>
white space
HTML versus XHTML
XHTML is merely a version of HTML that requires a stricter syntax.
In XHTML, all element and attribute names must be lowercase, and
attribute values must be enclosed in quotation marks. XHTML has
no empty tags — all tags, including instructional tags such as
, must always be closed. =“noresize”/>
frame noresize
<f
<f
<i
XHTML
Empty Tags
A few HTML tags are essentially instructions to the browser. For
example, the tag tells the browser where to insert an
image. Empty tags do not have or require closing tags, but are
instead placed in the document alone.
Container Tags
Most HTML tags are container tags that wrap around blocks of
text in your document to tell the browser both when to begin
applying formatting and when to end. Container tags are used in
sets, with an opening and a closing tag. The closing tag contains
the angle brackets and the element, and also includes a
backslash.
block of text