Online Book Reader

Home Category

HTML, XHTML and CSS All-In-One for Dummies - Andy Harris [12]

By Root 1358 0
Most of this book uses the XHTML standard. In this first chapter, I show part of an older standard called HTML. HTML is a little bit easier to start with, and everything I show in this chapter translates perfectly to the XHTML you use throughout the book.

In this minibook, you discover the modern form of Web design using XHTML. Your Web pages will be designed from the ground up, which makes them easy to modify and customize. While you figure out more advanced techniques throughout this book, you’ll take the humble pages you discover in this chapter and make them do all kinds of exciting things.


Creating a Basic Page

Here’s the great news: The most important Web technology you need is also the easiest. You don’t need any expensive or complicated software, and you don’t need a powerful computer. You probably have everything you need to get started already.

No more talking! Fire up a computer and let’s build a Web page!

1. Open a text editor.

You can use any text editor you want, as long as it lets you save files as plain text. If you’re using Windows, Notepad is fine for now. (Later, I show you some other free alternatives, but start with something you already know.)

Don’t use a word processor like Microsoft Word. It doesn’t save things in the right format, and not all the nifty features, like fonts and centering, work right. I promise that you’ll figure out how to do all that stuff but without using a word processor. Even the Save as HTML feature doesn’t work right. You really need a very simple text editor, and that’s it. In Chapter 3 of this minibook, I show you a few more editors that make your life easier. You’ll never use Word.

2. Type the following code.

Really. Type it in your text editor so you get some experience writing the actual code. I explain very soon what all this means, but type it now to get a feel for it:

My very first web page!

This is my first web page!

This is the first web page I’ve ever made,

and I’m extremely proud of it.

It is so cool!

3. Save the file as myFirst.html.

It’s important that your filename has no spaces and ends with the .html extension. Spaces cause problems on the Internet (which is, of course, where all good pages go to live), and the .html extension is how most computers know that this file is an HTML file (which is another name for a Web page). It doesn’t matter where you save the file, as long as you can find it in the next step.

4. Open your Web browser.

The Web browser is the program used to look at pages. After you post your page on a Web server somewhere, your Great Aunt Gertrude can use her Web browser to view your page. You also need one (a browser, not a Great Aunt Gertrude) to test your page. For now, use whatever browser you ordinarily use. Most Windows users already have Internet Explorer installed. If you’re a Mac user, you probably have Safari. Linux folks generally have Firefox. Any of these are fine. In Chapter 3 of this minibook, I explain why you probably need more than one browser and how to configure them for maximum usefulness.

5. Load your page into the browser.

You can do this a number of ways. You can use the browser’s File menu to open a local file, or you can simply drag the file from your Desktop (or wherever) to the open browser window.

6. Bask in your newfound genius.

Your simple text file is transformed! If all went well, it looks like Figure 1-1.

Figure 1-1: Congratula-tions! You’re now a Web developer!

Understanding the HTML in the Basic Page

The page you create in the previous section uses an extremely simple notation — HTML (HyperText Markup Language), which has been around since the beginning of the Web. HTML is a terrific technology for several reasons:

♦ It uses plain text. Most document systems (like word processors) use special binary encoding schemes that incorporate formatting directly into the computer’s internal language, which locks

Return Main Page Previous Page Next Page

®Online Book Reader