Introducing HTML

It wouldn’t be appropriate to try to give an exhaustive account of HTML (Hypertext Markup Language)—or, indeed, any of the other component technologies of Ajax—within this book. Instead we’ll review the fundamental principles and give some code examples to illustrate them, paying particular attention to the subjects that will become relevant when we start to develop Ajax applications.

What Is HTML?

The World Wide Web is constructed from many millions of individual pages, and those pages are, in general, written in Hypertext Markup Language, better known as HTML. Anyone who (like me) can remember the old pre-WYSIWYG word processing programs will already be familiar with text markup. Most of these old applications required that special characters be placed at the beginning and end of sections of text that you wanted to be displayed as (for instance) bold, italic, or underlined text.

First HTML Document

Let’s jump right in and create a simple HTML document. Open your chosen editor and enter the text shown in Listing 2.1. The HTML markup elements (often referred to as tags) are the character strings enclosed by < and >.

<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”  ”http://www.w3.org/TR/html4/loose.dtd”>
<html>
<head>
<title>A Simple HTML Document</title></head>
<body>
<h1>My HTML Page</h1>
Welcome to my first page written in HTML.<br />
This is simply a text document with HTML markup to show some
words in <b>bold</b> and some other words in <i>italics</i>.
<br />
</body>
</html>

Now save the document somewhere on your computer, giving it the name testpage.html. If you now load that page into your favorite browser, such as Internet Explorer or Firefox.

You can leave a response, or trackback from your own site.

Leave a Reply

Powered by WordPress | Visit www.iFreeCellPhones.com for Free Cell Phones. | Thanks to Palm Pre Blog, Find Best CD Rates and Fat burning furnace