Datasheet
Crowder c01.tex V3 - 05/26/2008 7:16pm Page 12
Part I Laying the Foundation
A simple setup for a Web page would be as follows:
<HTML>
<HEAd>
<title> A simple web page</title>
</head>
<body>
<P>This is paragraph one.</p>
<p>This is paragraph two.</p>
<p>and this is paragraph three.</p>
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
<br>
<hr>
<address>street, city, state</address>
</body>
</html>
Note that HTML is not case-sensitive and does not care what is uppercase and/or lowercase in
these elements. To the thousands of users challenged by pressing the Shift key correctly every
time, count your blessings. However, the content in between the tags won’t be automatically
corrected, so make sure that you capitalize words where necessary in the content you want to
display to the user of your Web page. In more advanced coding that deals with attributes, you
will learn that case does occasionally matter.
You will also note that every element in this example appears in a straight line against the left
margin. This formatting may provide for easier reading, but it is not necessary to produce effective
HTML code. Because HTML is totally insensitive to whitespaces, you could also enter the previous
example as follows:
<HTML><HEAd><title>A simple web page</title></head><body>
<P>This is paragraph one.</p><p>This is paragraph two</p>
<p>and this is paragraph three.</p>
<ul><li>Item 1</li><li>Item 2</li><li>Item 3</li></ul>
<br><hr>
<address>street, city, state</address></body>
</html>
Many Web browsers will fix small HTML errors automatically, since there are so many
different ways of interpreting HTML and all its different versions. This is sometimes
known as ‘‘promiscuous’’ or ‘‘dirty rendering’’ mode.
You can see how annoying this would be trying to read, however, especially if you were trying
to find where you made a typo. So, by convention, HTML is printed nicely, line by line, one
command per line, and sometimes indented to distinguish related sections (such as when using
nesting in
if-else command structures).
12