HTML and CSS Reference
In-Depth Information
Like a living language, HTML has dialects and slang expressions. Let's begin
by looking again at the simple “Hello World” page from Chapter 1, “HTML
and the Web.” It is reproduced as Example 2.1.
Example 2.1: HTML for a simple “Hello World” web page
<!DOCTYPE html>
<html>
<head>
<title> Example 2.1 </title>
<style type="text/css">
h1 { text-align: center; }
</style>
</head>
<body>
<h1> Hello World Wide Web </h1>
<p>
Welcome to the first of many webpages.
I promise they will get more interesting than this.
</p>
</body>
</html>
he HTML markup is shown in bold. his code can be saved in a text ile
and opened in a browser. he ilename should end with the extension .html or
.htm. Figure 2.1 shows how it looks in my browser (Firefox on Mac OSX) with
all the extra toolbars and status bars removed.
Figure 2.1: The “Hello World” page as displayed by a browser
 
 
Search WWH ::




Custom Search