Creating a New Page


The first HTML page that you create in a new site should be the index page , which is the page that a Web browser loads automatically when a visitor goes to the site. Depending on how you are naming pages on your site, the index page could have a variety of names , but it is most often named index.html . After you create the index page, you will want to create other pages for the site.

As you'll see is often the case with Dreamweaver, there is more than one way to do the task at hand. You can create a new page using the Start Page, or you can use the New Document dialog.

Using the Start Page

The Start Page is the fastest way to create a new HTML page. It appears when you have closed all other document windows .

To create a new page from the Start Page:

1.
Close any open document windows.

The Start Page appears ( Figure 3.1 ). Each of the items in the Start Page is a link.

Figure 3.1. Click the links in the Start Page to open a recent item, create a new item, or create a new item from Dreamweaver's sample pages.


2.
In the Create New section, click HTML.

Dreamweaver creates the new blank HTML page ( Figure 3.2 ).

Figure 3.2. A brand-new page in Dreamweaver, showing the Design view.


Tips

  • You can also use the Start Page to open pages that you recently worked on. Just click the item's name in the Open a Recent Item section of the Start Page.

  • Clicking ColdFusion or PHP in the Start Page also creates an HTML page. Clicking CSS creates a new CSS style sheet. Clicking any of the other choices creates documents designed for different Web programming languages that you would normally work with in Code view.

  • If you click any of the items listed in the Create from Samples section of the Start Page, Dreamweaver opens up the New Document dialog so you can choose the sample page you want. See "Using Sample Pages," later in this chapter.

  • If you don't want to use the Start Page at all, you can turn it off in Dreamweaver's Preferences. Choose Edit > Preferences (Dreamweaver > Preferences), and click the General category. Then clear the checkbox next to "Show start page."


Using the New Document dialog

The New Document dialog gives you a bit more flexibility than the Start Page when creating new documents. Like the Start Page, you can create several different types of new documents, plus it allows you to choose the doctype of the new document.

To create a new page from the New Document dialog:

1.
Choose File > New, or press Ctrl-N (Cmd-N).

The New Document dialog appears ( Figure 3.3 ), set to the General tab.

Figure 3.3. You'll probably create most of your new pages from the New Document dialog.


2.
Click to choose one of the items in the Category column.

The second column changes to show the available items for the category you selected. The name of this column also changes to match the name of the category.

3.
Click the item you want in the second column.

If Dreamweaver has a preview image of the item you selected available, it will appear in the Preview pane (previews are mostly available for sample pages and templates), with its description below the preview area.

4.
(Optional) Some of the kinds of documents you can create in this dialog allow you to declare their doctype , and for those the Document Type (DTD) pop-up menu will be available. Most of the time the default choice will be fine, but if you want to you can change the doctype from the pop-up menu ( Figure 3.4 ).

Figure 3.4. You can choose from the available DTDs in the New Document dialog.


5.
Click Create.

Dreamweaver creates the new document and displays it in a new window.

Tips

  • If you want to change any of the defaults for a new document, click the Preferences button in the New Document dialog. In the resulting dialog ( Figure 3.5 ), you can change the default document type for the New Document dialog; the extension used for that document; the default DTD; and the default character encoding. You can also choose whether or not you want the New Document dialog to appear when you press Ctrl-N (Cmd-N), or if you just want Dreamweaver to create a new default document.

    Figure 3.5. Change the defaults for new pages in the New Document category of Dreamweaver's Preferences dialog.

  • We'll cover the Templates tab of the New Document dialog in Chapter 13.


Behind the Doctype

If you're not familiar with doctype , it's a declaration at the start of an HTML page that specifies the DTD (Document Type Definition) that is in use for the file. Web browsers use the doctype declaration in order to determine how the page should be rendered.

By default, Dreamweaver 8 inserts the "XHTML 1.0 Transitional" doctype , and the code it creates is consistent with that standard.





Macromedia Dreamweaver 8 for Windows & Macintosh Visual QuickStart Guide
Macromedia Dreamweaver 8 for Windows & Macintosh
ISBN: 0321350278
EAN: 2147483647
Year: 2005
Pages: 239

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net