35
Sample Hands-On-TrainingChapter – Review Copy Only Copyright ©2000-2003 by lynda.com, Inc. All Rights Reserved. Reproduction and Distribution Strictly Prohibited. This electronically distributed Hands-On-Training™ document is for review purposes only and is intended for on-screen viewing only. Any printing, reproduction, copying, distribution, and/or transmission of this document are strictly prohibited without written consent from lynda.com, Inc. Contact Information Garo Green ([email protected] ) Director, Publications lynda.com, Inc. PO Box 789 Ojai, California 93024 Phone: 805-646-7076 Fax: 805-640-9607 Notice of Rights All rights reserved. No part of this book may be reproduced or transmitted in any form by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of the lynda.com, Inc. For information on getting permission for reprints and excerpts, contact [email protected] . Notice of Liability The information in this book is distributed on an “As Is” basis, without warranty. While every precaution has been taken in the preparation of the book, neither the author nor Peachpit Press shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the instructions contained in this book or by the computer software and hardware products described in it. Trademarks Hands-On-Training is a registered trademark of lynda.com, Inc. Macromedia is a registered trademark. Macromedia Dreamweaver and Dreamweaver, and Macromedia Fireworks and Fireworks are registered trademarks of Macromedia, Inc., in the U.S. and/or other countries. QuickTime and the QuickTime logo are trademarks used under license. The QuickTime logo is registered in the U.S. and other countries.

Sample Hands-On-Training Chapter – Review Copy Only Copyright …files.lynda.com/.../EDU_HOT_CHAPTERS/DW_MX/DW_MX_Chap_04.pdf · 2011. 7. 29. · Page section. This tells Dreamweaver

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Sample Hands-On-Training Chapter – Review Copy Only Copyright …files.lynda.com/.../EDU_HOT_CHAPTERS/DW_MX/DW_MX_Chap_04.pdf · 2011. 7. 29. · Page section. This tells Dreamweaver

Sample Hands-On-Training™ Chapter – Review Copy Only Copyright ©2000-2003 by lynda.com, Inc. All Rights Reserved. Reproduction and Distribution Strictly Prohibited. This electronically distributed Hands-On-Training™ document is for review purposes only and is intended for on-screen viewing only. Any printing, reproduction, copying, distribution, and/or transmission of this document are strictly prohibited without written consent from lynda.com, Inc. Contact Information Garo Green ([email protected]) Director, Publications lynda.com, Inc. PO Box 789 Ojai, California 93024 Phone: 805-646-7076 Fax: 805-640-9607 Notice of Rights All rights reserved. No part of this book may be reproduced or transmitted in any form by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of the lynda.com, Inc. For information on getting permission for reprints and excerpts, contact [email protected]. Notice of Liability The information in this book is distributed on an “As Is” basis, without warranty. While every precaution has been taken in the preparation of the book, neither the author nor Peachpit Press shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the instructions contained in this book or by the computer software and hardware products described in it. Trademarks Hands-On-Training is a registered trademark of lynda.com, Inc. Macromedia is a registered trademark. Macromedia Dreamweaver and Dreamweaver, and Macromedia Fireworks and Fireworks are registered trademarks of Macromedia, Inc., in the U.S. and/or other countries. QuickTime and the QuickTime logo are trademarks used under license. The QuickTime logo is registered in the U.S. and other countries.

Page 2: Sample Hands-On-Training Chapter – Review Copy Only Copyright …files.lynda.com/.../EDU_HOT_CHAPTERS/DW_MX/DW_MX_Chap_04.pdf · 2011. 7. 29. · Page section. This tells Dreamweaver

4.Basics | Dreamweaver MX H•O•T

| 88 |

If you’re the impatient type (as we would franklycharacterize ourselves), this is the chapter

you’ve been waiting for. The following exer-cises teach you how to define a site,

create and save a page, insert and alignimages and text, link images and text,color text links, and insert METAinformation (such as keywords anddescriptions for search engines).Covering this much material mayseem overwhelming, but fortunatelyDreamweaver MX makes most ofthese operations as simple asaccessing a menu or property bar.

By the time you are done with this chapter, your Dreamweaver MX

feet will finally be wet, and you will bewell on your way to understanding the

program’s interface for creating pagesand sites. The exercises here will be your

foundation for building more complex pages in future chapters.

4.Basics

| Defining the Site | Creating a Document |

| Inserting and Centering Images and Text |

| Modifying Page Properties | Creating Links | META Tags |

chap_04

Dreamweaver MX H•O•T CD-ROM

04 DW MX HOT (088-121)vR3 10/15/02 10:13 PM Page 88

Page 3: Sample Hands-On-Training Chapter – Review Copy Only Copyright …files.lynda.com/.../EDU_HOT_CHAPTERS/DW_MX/DW_MX_Chap_04.pdf · 2011. 7. 29. · Page section. This tells Dreamweaver

Dreamweaver MX H•O•T | 4.Basics

| 89 |

Defining the Site

In each new chapter, we request that you copy files from the H•O•T CD-ROM to a folder on your harddrive. In this exercise, you will revisit how to define a site based on the contents of the folder. Becauseeach chapter of this book features different files, each chapter is defined as its own distinct site, soyou will go through the process of this exercise many times. Normally, if you were working on a singlesite, you would most likely define your site once. If you switched projects, however, you would need todefine a new site. Dreamweaver MX allows you to manage multiple sites, which is helpful if you havemultiple clients or projects for which you plan to use the program.

1.

1. Copy the chap_04 folder from the H•O•T CD-ROM to your hard drive.

2. Make sure the Site panel is open. If it’s not, press F8.

3. Select Site > New Site, which will open the Site Definition window.

04 DW MX HOT (088-121)vR3 10/15/02 10:13 PM Page 89

Page 4: Sample Hands-On-Training Chapter – Review Copy Only Copyright …files.lynda.com/.../EDU_HOT_CHAPTERS/DW_MX/DW_MX_Chap_04.pdf · 2011. 7. 29. · Page section. This tells Dreamweaver

4.Basics | Dreamweaver MX H•O•T

| 90 |

4. Make sure the Basic tab, in the upper-left corner, is selected. In the What would you like to nameyour site? text field, type Chapter 4. This defines the name for your site. This name is an internal namingconvention used by Dreamweaver MX. You can use any name you want, including special characters,such as spaces, dashes, etc. Click Next.

5. Make sure the No, I do not want to use a server technology radio button is selected. This tellsDreamweaver MX you are creating a static Web site and are not going to use a server technology,such as ASP, CFM, etc., with your site. A server technology is necessary if you were creating a Website that connected to a database to generate dynamic data. Click Next.

Don’t worry if you change your mind later. You can change all of the settings you define for your siteat a later date. Phew!

04 DW MX HOT (088-121)vR3 10/15/02 10:13 PM Page 90

Page 5: Sample Hands-On-Training Chapter – Review Copy Only Copyright …files.lynda.com/.../EDU_HOT_CHAPTERS/DW_MX/DW_MX_Chap_04.pdf · 2011. 7. 29. · Page section. This tells Dreamweaver

Dreamweaver MX H•O•T | 4.Basics

| 91 |

6. Make sure the Edit local copies on my machine, then upload to the server when ready (recommended) radio button is selected. This tells Dreamweaver MX that you want to create the Web pages on your computer and upload them when you are ready. This is the most common way to create and publish Web pages.

7. Click the small yellow folder icon to open the browse dialog box. Locate the chap_04 folder on your desktop:

• Mac: Highlight the chap_04 folder and click Choose.

• Windows: Double-click the chap_04 folder to open it. Click Open.

This specifies the folder you want to use as the local root folder for your site. In this case, you areusing the chap_04 folder as the local root folder. Each site you define in Dreamweaver MX must point to a folder that are using as the local root folder. Click Next.

04 DW MX HOT (088-121)vR3 10/15/02 10:13 PM Page 91

Page 6: Sample Hands-On-Training Chapter – Review Copy Only Copyright …files.lynda.com/.../EDU_HOT_CHAPTERS/DW_MX/DW_MX_Chap_04.pdf · 2011. 7. 29. · Page section. This tells Dreamweaver

4.Basics | Dreamweaver MX H•O•T

| 92 |

8. Make sure the How do you connect to your remove server? option is set to None. You will learnmore about connecting to a remote Web server and how to upload files later in Chapter 20, “Getting ItOnline.” Click Next.

9. The next screen displays a summary of the settings you have specified for this site. Take a momentto review the information on this screen. If you have made a mistake, you can click Back to return toany of the previous screens to make any needed changes. Click Done if everything looks okay.

04 DW MX HOT (088-121)vR3 10/15/02 10:13 PM Page 92

Page 7: Sample Hands-On-Training Chapter – Review Copy Only Copyright …files.lynda.com/.../EDU_HOT_CHAPTERS/DW_MX/DW_MX_Chap_04.pdf · 2011. 7. 29. · Page section. This tells Dreamweaver

Dreamweaver MX H•O•T | 4.Basics

| 93 |

NOTE | Basic and Advanced Tabs

You might have noticed that the Site Definition window contains two tabs: Basic and Advanced.These tabs serve the same purpose: They both let you define a site. The Basic tab is more of a wizard approach, where you define a site by answering a series of questions. This is a greatplace to start if you are new to Dreamweaver MX. The Advanced tab is where more experiencedDreamweaver MX users will go to define a site. The Advanced tab gives you direct access to allthe options necessary to define a site and work with other site features, such as Design Notes,modifying the Site Map Layout options, and changing the Site panel column options. As youbecome more experienced with Dreamweaver MX, you will find yourself using the Advanced tab to define your sites.

04 DW MX HOT (088-121)vR3 10/15/02 10:13 PM Page 93

Page 8: Sample Hands-On-Training Chapter – Review Copy Only Copyright …files.lynda.com/.../EDU_HOT_CHAPTERS/DW_MX/DW_MX_Chap_04.pdf · 2011. 7. 29. · Page section. This tells Dreamweaver

4.Basics | Dreamweaver MX H•O•T

| 94 |

Creating and Saving a New Document

This next exercise teaches you how to create and save a document in Dreamweaver MX. You will besaving this document as index.html, which has special significance in HTML, and almost alwaysmeans that it is the beginning page of a site. Additionally, you will learn to set the title of this documentto The Bonsai Hut.

2.

1. If a blank document window is already open, close it and don’t save any changes if you are prompted. Each time you open Dreamweaver MX, a new blank document window willopen automatically. But, for this exercise, we want to show you how to create a new docu-ment from scratch.

2. Select File > New. This will open the New Document dialog box, which lets you choose atemplate for your new document.

3. Make sure the Basic Page category is selected and then choose HTML under the BasicPage section. This tells Dreamweaver MX that you want to create an HTML page. Becauseyou have selected HTML, Dreamweaver MX will create a new blank page with the basicHTML tags necessary to get started. Click Create.

04 DW MX HOT (088-121)vR3 10/15/02 10:13 PM Page 94

Page 9: Sample Hands-On-Training Chapter – Review Copy Only Copyright …files.lynda.com/.../EDU_HOT_CHAPTERS/DW_MX/DW_MX_Chap_04.pdf · 2011. 7. 29. · Page section. This tells Dreamweaver

Dreamweaver MX H•O•T | 4.Basics

| 95 |

NOTE | The New Document Dialog Box

The New Document dialog box gives you access to many templates that you can use for creatingnew pages in Dreamweaver MX. These templates are designed to give you the necessary codeto begin creating pages for specific purposes. Within each category are a number of differenttemplate options. For example, within the Framesets category are a number of different framesetdesigns. All of the templates are designed to save you time and get you started in the right direc-tion. Some categories have a checkbox that will make sure the code is XHTML-compliant.

04 DW MX HOT (088-121)vR3 10/15/02 10:13 PM Page 95

Page 10: Sample Hands-On-Training Chapter – Review Copy Only Copyright …files.lynda.com/.../EDU_HOT_CHAPTERS/DW_MX/DW_MX_Chap_04.pdf · 2011. 7. 29. · Page section. This tells Dreamweaver

4.Basics | Dreamweaver MX H•O•T

| 96 |

The New Document window will close, and a new blank HTML document window will open.

4. In the document panel’s Title text field, type The Bonsai Hut. Press Return/Enter. This will definethe page title for this page. The page title appears at the top of the browser when the page is beingviewed and is the name used when a page is bookmarked. Right now the page is blank, but you’regoing to turn it into a cool and functional Web page in a jiffy.

Before you get started, it is very important that you save your file first. All of the site managementbenefits introduced in the last exercise depend on Dreamweaver MX knowing the name of your file.With this ability, the program constantly notifies you if you are working on an unsaved document.Besides, no one wants to unexpectedly lose work, and this practice is good insurance against system crashes and/or a power outage.

Page title

04 DW MX HOT (088-121)vR3 10/15/02 10:13 PM Page 96

Page 11: Sample Hands-On-Training Chapter – Review Copy Only Copyright …files.lynda.com/.../EDU_HOT_CHAPTERS/DW_MX/DW_MX_Chap_04.pdf · 2011. 7. 29. · Page section. This tells Dreamweaver

Dreamweaver MX H•O•T | 4.Basics

| 97 |

5. Save the file as index.html inside the chap_04 folder on your hard disk. Leave this file open; youwill be using it in the next exercise.

There are two names in the title bar of your document panel. The first is the title of the document(The Bonsai Hut). The second name is the file name (index.htm), which shows up to the right of the title. The title can be different from the file name, as in this example.

File Names versus TitlesAs you create Web pages with Dreamweaver MX, you will need to specify various names for your files,folders, sites, etc. This might not seem tricky at first glance, but two different names are actually asso-ciated with HTML files: the file name and the title.

When you save a document, you will be assigning its file name. The file name must always end withthe .htm or .html extension. The other name associated with the document is called the title. The fileindex.html here, for example, has the title The Bonsai Hut.

Page title File name

04 DW MX HOT (088-121)vR3 10/15/02 10:13 PM Page 97

Page 12: Sample Hands-On-Training Chapter – Review Copy Only Copyright …files.lynda.com/.../EDU_HOT_CHAPTERS/DW_MX/DW_MX_Chap_04.pdf · 2011. 7. 29. · Page section. This tells Dreamweaver

4.Basics | Dreamweaver MX H•O•T

| 98 |

It is essential that file names do not contain spaces or special characters. Page titles, however, aremuch more flexible, and you should make them more descriptive than the file name. A title can containspaces and special characters; file names should not. When the page is viewed from a Web browser,the title will be much more visible to your end user than the file name. Also, when end users bookmarkthis page, the title will appear in their bookmark list.

In this example (which you will build in this chapter), note that the title appears in the browser’s titlebar, and the file name appears in the URL. The file name is essential in that it allows the browser tounderstand that this is an HTML file, and to display the page properly. Titles are also important becausethey are sometimes used as the description for your site in search engines.

Page title File name

04 DW MX HOT (088-121)vR3 10/15/02 10:13 PM Page 98

Page 13: Sample Hands-On-Training Chapter – Review Copy Only Copyright …files.lynda.com/.../EDU_HOT_CHAPTERS/DW_MX/DW_MX_Chap_04.pdf · 2011. 7. 29. · Page section. This tells Dreamweaver

Dreamweaver MX H•O•T | 4.Basics

| 99 |

The Significance of index.htmlYou just created a document called index.html. What you may or may not appreciate is that this partic-ular file name has special significance. Most Web servers recognize the index.htm (or index.html) asthe default home page. You can use .htm and .html interchangeably; both will be recognized by theWeb server as HTML pages. If you type the URL http://www.lynda.com, for example, what you willreally see is http://www.lynda.com/index.html, even though you didn’t type it that way. The Web serverknows to open the index.html file automatically without requiring the full URL to be typed. Therefore, ifyou name the opening page of your Web site with the file name index.html, the Web server will knowto automatically display this file first.

Taking this concept one step further, you can have an opening page for each section of your Web site,not just for your home page. This feature has definite advantages—among them, your users won’t findthemselves looking at a generic index like in the following example.

This is why the file name index.html is so significant. It’s also the reason most professional Webdevelopers use it as the root file name, although on some servers a different name is used, such as default.html. What you may not realize is that you are not limited to just one index.html on your site. You can have an index.html inside each folder that represents a category for your site, such asCompany, Services, Store, and Products.

If you do not have an index.html file in your site, browsers will display a general list of your files, such as this example.

04 DW MX HOT (088-121)vR3 10/15/02 10:13 PM Page 99

Page 14: Sample Hands-On-Training Chapter – Review Copy Only Copyright …files.lynda.com/.../EDU_HOT_CHAPTERS/DW_MX/DW_MX_Chap_04.pdf · 2011. 7. 29. · Page section. This tells Dreamweaver

4.Basics | Dreamweaver MX H•O•T

| 100 |

Inserting Images

In this exercise, you will continue working with the index.htm file and learn to insert images for yourpage’s headline, logo, and navigation bar.

3.

1. Make sure the Assets panel is open by choosing Window > Assets or by pressing F11.Inserting images from the Assets panel ensures that you are working only with images fromwithin your local root folder. This is a good thing, because inserting images from outside yourlocal root folder will cause problems when you try to upload your page to the Web server.

04 DW MX HOT (088-121)vR3 10/15/02 10:13 PM Page 100

Page 15: Sample Hands-On-Training Chapter – Review Copy Only Copyright …files.lynda.com/.../EDU_HOT_CHAPTERS/DW_MX/DW_MX_Chap_04.pdf · 2011. 7. 29. · Page section. This tells Dreamweaver

Dreamweaver MX H•O•T | 4.Basics

| 101 |

2. Within the Assets panel, select the header.gif file. Click Insert at the bottom of the Assets panel.This will insert the selected image onto your page.

3. In the Document window, click to the right of the header.gif image to deselect it, and pressEnter/Return to create a paragraph break, causing a space to form between the headline graphic and the next image.

4. Within the Assets panel, select the center_splash_image.gif file. Click Insert at the bottom of theAssets panel. This will insert the selected image onto your page.

5. Click to the right of the image to deselect it, and then press Enter/Return. This inserts anotherparagraph break between this image and the next.

04 DW MX HOT (088-121)vR3 10/15/02 10:13 PM Page 101

Page 16: Sample Hands-On-Training Chapter – Review Copy Only Copyright …files.lynda.com/.../EDU_HOT_CHAPTERS/DW_MX/DW_MX_Chap_04.pdf · 2011. 7. 29. · Page section. This tells Dreamweaver

4.Basics | Dreamweaver MX H•O•T

| 102 |

6. Within the Assets panel, select the art_of_bonsai.gif file. Click Insert at the bottom of the Assets panel.

7. Within the Assets panel, select the how_to_bonsai.gif file. Click Insert at the bottom of the Assets panel.

8. Within the Assets panel, select the tools_and_supplies.gif file. Click Insert at the bottom of theAssets panel.

9. Within the Assets panel, select the resources.gif file. Click Insert at the bottom of the Assets panel.

10. Within the Assets panel, select the photo_gallery.gif file. Click Insert at the bottom of the Assets panel.

11. Within the Assets panel, select the contact_info.gif file. Click Insert at the bottom of the Assets panel.

This is what your page should look like at this point.

12. Save your file and leave it open for the next exercise.

04 DW MX HOT (088-121)vR3 10/15/02 10:13 PM Page 102

Page 17: Sample Hands-On-Training Chapter – Review Copy Only Copyright …files.lynda.com/.../EDU_HOT_CHAPTERS/DW_MX/DW_MX_Chap_04.pdf · 2011. 7. 29. · Page section. This tells Dreamweaver

Dreamweaver MX H•O•T | 4.Basics

| 103 |

TIP | Other Ways to Insert Images

There are many ways to insert images in Dreamweaver MX. In this exercise, you learned how touse the Assets panel to insert images onto your page. We think this is not only the quickest way,but also the safest way to insert images onto your page. Why? First, only images within your localroot folder are listed in the Assets panel. Second, by inserting images from within your local rootfolder you ensure that the proper paths will be created, so everything works when you uploadyour page to a remote Web server. But the Assets panel isn’t the only way to insert images inDreamweaver MX. Here are three other ways to insert images:

• Select Insert > Image

• Click the Insert Image button in the Insert panel.

• Press Ctrl+Alt+I (Windows) or Cmd+Option+I (Mac)

As you become more comfortable with Dreamweaver MX, you should use the method that feelsmost comfortable.

04 DW MX HOT (088-121)vR3 10/15/02 10:13 PM Page 103

Page 18: Sample Hands-On-Training Chapter – Review Copy Only Copyright …files.lynda.com/.../EDU_HOT_CHAPTERS/DW_MX/DW_MX_Chap_04.pdf · 2011. 7. 29. · Page section. This tells Dreamweaver

4.Basics | Dreamweaver MX H•O•T

| 104 |

Inserting Text

Adding text to your Web page is simple in Dreamweaver MX. Just like your favorite word processor,you can simply start typing text on your page and the text will appear.

In this exercise, you will add some text at the bottom of your page as an alternate navigation system,which is useful to users who might have images turned off in their browser settings or be browsing in a nongraphical browser (such as those used by sight-impaired audiences).

4.

1. Click to the right of the contact_info.gif file you inserted in the last exercise and pressEnter/Return to create a paragraph break. Type home, press the spacebar, press Shift+backslash to insert a small vertical line (|), or “pipe,” and press the spacebar again.

2. Type art of bonsai, press the spacebar, press Shift+backslash to insert a pipe, andpress the spacebar again.

3. Type how to bonsai, press the spacebar, press Shift+backslash to insert a pipe, andpress the spacebar again.

04 DW MX HOT (088-121)vR3 10/15/02 10:13 PM Page 104

Page 19: Sample Hands-On-Training Chapter – Review Copy Only Copyright …files.lynda.com/.../EDU_HOT_CHAPTERS/DW_MX/DW_MX_Chap_04.pdf · 2011. 7. 29. · Page section. This tells Dreamweaver

Dreamweaver MX H•O•T | 4.Basics

| 105 |

4. Type tools and supplies, press the spacebar, press Shift+backslash to insert a pipe, and pressthe spacebar again.

5. Type resources, press the spacebar, press Shift+backslash to insert a pipe, and press thespacebar again.

6. Type photo gallery, press the spacebar, press Shift+backslash to insert a pipe, and press thespacebar again.

7. Type contact information.

8. Press Shift+Enter/Return to create a line break. This puts your type-insertion cursor on the nextline without introducing a two-line paragraph return.

9. Type visit treebay.com to learn more about bonsai.

This is what your page should look like now.

10. Save your file.

04 DW MX HOT (088-121)vR3 10/15/02 10:13 PM Page 105

Page 20: Sample Hands-On-Training Chapter – Review Copy Only Copyright …files.lynda.com/.../EDU_HOT_CHAPTERS/DW_MX/DW_MX_Chap_04.pdf · 2011. 7. 29. · Page section. This tells Dreamweaver

4.Basics | Dreamweaver MX H•O•T

| 106 |

NOTE | Paragraph versus Line Breaks

You may have noticed that each time you pressed the Enter/Return key, Dreamweaver MXskipped down the page two lines. Pressing this key inserts a single paragraph break. The HTMLtag for a paragraph break is <p>. This is useful when you want to increase the space betweendifferent paragraphs. However, there will be times when you just want to go to one line directlybelow the one you are working on without introducing extra space. Pressing Shift+Return (orShift+Enter) inserts a line break instead. The HTML tag for a line break is <br>. Knowing thedifference between a <p> and a <br> will allow you to control the spacing between lines of text.Note: If your screen looks different from ours, that’s because we changed a setting in the CodeView panel called Word Wrap. You will learn to do this in Chapter 12, “HTML.”

The paragraph tag <p> will enter an extra line between the closing paragraph tag </p> and thenext line of content. The line break tag <br> will place content on the very next line. You can seeboth of these here.

continues on next page

This is wherethe closing

paragraph tag<p> is located This is

where theline breaktag <br> is located

04 DW MX HOT (088-121)vR3 10/15/02 10:13 PM Page 106

Page 21: Sample Hands-On-Training Chapter – Review Copy Only Copyright …files.lynda.com/.../EDU_HOT_CHAPTERS/DW_MX/DW_MX_Chap_04.pdf · 2011. 7. 29. · Page section. This tells Dreamweaver

Dreamweaver MX H•O•T | 4.Basics

| 107 |

NOTE | Paragraph Versus Line Breaks continued

This is what the closing paragraph tag </p> and the line break <br> tag look like in the HTML code.

04 DW MX HOT (088-121)vR3 10/15/02 10:13 PM Page 107

Page 22: Sample Hands-On-Training Chapter – Review Copy Only Copyright …files.lynda.com/.../EDU_HOT_CHAPTERS/DW_MX/DW_MX_Chap_04.pdf · 2011. 7. 29. · Page section. This tells Dreamweaver

4.Basics | Dreamweaver MX H•O•T

| 108 |

Centering Images and Text

Now that you have added the images and text to your page, it’s time to learn how to center them. Thissection shows you how to use centering procedures with text and images.

5.

1. Select the bonsaihut.com logo image from the previous exercise (header.gif) at the topof the screen.

2. Click the Align Center button in the Property Inspector. This will snap the logo to thecenter of the screen.

3. Hold down the Shift key and click on the remaining images: the tree image (center_splash_image.gif), Art of Bonsai (art_of_bonsai.gif), How to Bonsai (how_to_bonsai.gif),Tools & Supplies (tools_and_supplies.gif), Resources (resources.gif), Photo Gallery(photo_gallery.gif), and Contact Information (contact_info.gif). Still holding down the Shiftkey, select the text at the bottom of the screen. Holding down the Shift key allows you toselect multiple items at once.

4. Click the Align Center button in the Property Inspector.

Your page should look like this at the end of the exercise.

5. Save the file and leave it open for the next exercise.

04 DW MX HOT (088-121)vR3 10/15/02 10:13 PM Page 108

Page 23: Sample Hands-On-Training Chapter – Review Copy Only Copyright …files.lynda.com/.../EDU_HOT_CHAPTERS/DW_MX/DW_MX_Chap_04.pdf · 2011. 7. 29. · Page section. This tells Dreamweaver

Dreamweaver MX H•O•T | 4.Basics

| 109 |

Modifying Page Properties

This exercise walks you through changing the colors of your page, using the Page Properties panel.The Page Properties feature controls many important attributes of your page, including the documenttitle (which we looked at in Exercise 2), and the colors you set for your text and links.

6.

1. Select Modify > Page Properties or use the shortcut—Ctrl+J (Windows) or Cmd+J(Mac)—to access Page Properties.

2. Move this panel to the side so you can see the Page Properties and your document at thesame time.

3. Click the small box to the right of the word Background. This will open the Dreamweaver MXcolor picker.

04 DW MX HOT (088-121)vR3 10/15/02 10:13 PM Page 109

Page 24: Sample Hands-On-Training Chapter – Review Copy Only Copyright …files.lynda.com/.../EDU_HOT_CHAPTERS/DW_MX/DW_MX_Chap_04.pdf · 2011. 7. 29. · Page section. This tells Dreamweaver

4.Basics | Dreamweaver MX H•O•T

| 110 |

4. With your mouse button depressed, move the eye dropper outside of the Page Properties paneland release the mouse on the background of the bonsaihut.com image. This will set the backgroundcolor of your page to match the edge of this image. To instantly see the results, click Apply. Don’t click OK yet, because you still need to set more colors in the upcoming steps.

5. Click inside the text box next to the Text option. Type #CCCC99. Click Apply. You just colored allyour dark green in this document. The Apply button is actually accepting your changes; it is not merelya preview. Clicking it is the same as clicking OK, except that it does not close the panel.

To set other colors, you can insert your own values.

04 DW MX HOT (088-121)vR3 10/15/02 10:13 PM Page 110

Page 25: Sample Hands-On-Training Chapter – Review Copy Only Copyright …files.lynda.com/.../EDU_HOT_CHAPTERS/DW_MX/DW_MX_Chap_04.pdf · 2011. 7. 29. · Page section. This tells Dreamweaver

Dreamweaver MX H•O•T | 4.Basics

| 111 |

6. Type #990000 for the Links option, which will set the link text in this document to dark red. Type#999966 for the Visited Links option, which will set visited link text to dark green, letting the userknow that that link has already been viewed.

7. You could also choose a color by sight, instead of typing in a hexadecimal value. Click the box to theright of the words Active Links and the color picker will open. Move the eye dropper over the yellowbackground of the page and click. This will set the active link color to the same color as the back-ground. The only time an active link color shows is when the mouse button is clicked on the link.

8. Click OK.

This is what the results of this exercise should look like.

9. Save the document and leave it open for the next exercise.

04 DW MX HOT (088-121)vR3 10/15/02 10:13 PM Page 111

Page 26: Sample Hands-On-Training Chapter – Review Copy Only Copyright …files.lynda.com/.../EDU_HOT_CHAPTERS/DW_MX/DW_MX_Chap_04.pdf · 2011. 7. 29. · Page section. This tells Dreamweaver

4.Basics | Dreamweaver MX H•O•T

| 112 |

The Page Properties PanelThe Page Properties panel does more than just set the colors of the links and your document title. Seethe following chart for an explanation of all its features.

Page Properties

Property Description

Title The title of your page is what will appear in the title bar of the Webbrowser and when your page is bookmarked. This name can contain as many characters as you want, including special characters, such as %(#* ! .

Background Image If you want a background image for your Web page, you would specify ithere. A background image can be any GIF or JPEG file. If the image issmaller than the Web browser panel, it will repeat (tile).

Background Sets the background color. The values can be in hexadecimal format orby name, for example red, white, etc.

Text Sets the default text color. It can be overwritten for specific areas of text.

Links Sets the color for links. This option can be overwritten for specific links.

Visited Links A visited link color specifies how the link will appear after a visitor hasclicked it.

Active Links The active link color specifies how the link will appear while someoneclicks it.

Document Encoding Specifies the language for the characters and fonts used in the document.

Tracing Image Tracing images are used as guides to set up the layout of your page.They can be any GIF, JPEG, or PNG file.

Transparency Sets the transparency level of your tracing image.

Left Margin Sets the left margin value in pixels. This attribute is supported only inInternet Explorer 4.0 or later.

Top Margin Sets the top margin value in pixels. This attribute is supported only inInternet Explorer 4.0 or later.

Margin Width Sets the margin width value in pixels. This attribute is supported only inNetscape Navigator 4.0 or later.

Margin Height Sets the margin height value in pixels. This attribute is supported only inNetscape Navigator 4.0 or later.

04 DW MX HOT (088-121)vR3 10/15/02 10:13 PM Page 112

Page 27: Sample Hands-On-Training Chapter – Review Copy Only Copyright …files.lynda.com/.../EDU_HOT_CHAPTERS/DW_MX/DW_MX_Chap_04.pdf · 2011. 7. 29. · Page section. This tells Dreamweaver

Dreamweaver MX H•O•T | 4.Basics

| 113 |

The Dreamweaver Color PickersFrom the Page Properties dialog box, Dreamweaver MX gives you access to five different color pick-ers, from which you can select the colors for your pages. Two of the color pickers, Color Cubes andContinuous Tone, are browser-safe, and they’re arranged in a manner that makes it easy to selectpleasing color combinations. To understand each function of the color picker drop-down menu, see the color picker options chart.

NOTE | What Is Browser-Safe Color?

Browser-safe colors are the 216 colors supported by browsers across platforms (Mac andWindows). If you use the browser-safe colors inside the Page Properties settings, you reduce the risk of having your colors shift when people view your Web pages.

Color preview

Default color System colors

Hex value

04 DW MX HOT (088-121)vR3 10/15/02 10:13 PM Page 113

Page 28: Sample Hands-On-Training Chapter – Review Copy Only Copyright …files.lynda.com/.../EDU_HOT_CHAPTERS/DW_MX/DW_MX_Chap_04.pdf · 2011. 7. 29. · Page section. This tells Dreamweaver

4.Basics | Dreamweaver MX H•O•T

| 114 |

Color Picker Options

Option Description

Color preview Gives you a preview of the color that is currently selected or the color thatthe eye dropper is picking up.

Hex value Displays the hexadecimal value of the current color or the color that theeyedropper is picking up.

Default color Removes any colors you have selected. If you do not specify a color in thePage Properties, the user’s browser will determine what colors are used forthe different text options.

System colors Opens the system color options for your computer—these options will varybetween the Mac and Windows operating systems.

Color Options This drop-down menu lets you choose from five different color arrangements.The Color Cubes and Continuous Tone options contain only Web-safe colors.The Windows and Mac options contain the system colors for the Windowsand Mac operating systems. The Grayscale option contains grays rangingfrom black to white.

Snap to Web Safe Automatically switches non–Web-safe colors to their nearest Web-safe value.

04 DW MX HOT (088-121)vR3 10/15/02 10:13 PM Page 114

Page 29: Sample Hands-On-Training Chapter – Review Copy Only Copyright …files.lynda.com/.../EDU_HOT_CHAPTERS/DW_MX/DW_MX_Chap_04.pdf · 2011. 7. 29. · Page section. This tells Dreamweaver

Dreamweaver MX H•O•T | 4.Basics

| 115 |

Creating Links with Images and Text

The ability to link to pages and sites is what makes the Web dynamic. This exercise shows you how to set up links using the Dreamweaver MX Property Inspector.

7.

1. Select the art_of_bonsai.gif (Art of Bonsai) image in the lower-left part of the screen.

2. Click the Browse for File icon, next to the Link option, in the Property Inspector. Note:If your Property Inspector panel is smaller than what is shown here, click the arrow in thelower-right corner to expand it.

04 DW MX HOT (088-121)vR3 10/15/02 10:13 PM Page 115

Page 30: Sample Hands-On-Training Chapter – Review Copy Only Copyright …files.lynda.com/.../EDU_HOT_CHAPTERS/DW_MX/DW_MX_Chap_04.pdf · 2011. 7. 29. · Page section. This tells Dreamweaver

4.Basics | Dreamweaver MX H•O•T

| 116 |

3. Browse to chap_04/art_of_bonsai/index.html and click OK (Windows) or Choose (Macintosh).Congratulations, you have just created your first relative image link. Why is it relative? It is relativesimply because it linked to a document within this site, not to an external Web site.

4. Highlight the how_to_bonsai.gif (How To Bonsai) image in the lower-left corner of the screen.

5. Click the Browse for File icon next to the Link option in the Property Inspector.

6. Browse to chap_04/how_to_bonsai/index.html. Click OK. This image is now linked to theindex.html page inside the how_to_bonsai folder.

7. Repeat this process for the remaining navigation icons. Select the tools_and_supplies.gif (Tools & Supplies) image and link it to chap_04/tools_and_supplies/index.html. Click OK. Select theresources.gif (Resources) image and link it to chap_04/resources/index.html. Click OK. Select thephoto_gallery.gif (Photo Gallery) image and link it to chap_04/photo_gallery/index.html. Click OK.Select the contact_info.gif (Contact Information) image and link it to chap_04/contact_info/index.html.Click OK.

You have just successfully added links to the images on this page! If you want to preview the links in a browser, press F12 and click any of the images. Note: If a browser does not launch when youpress F12, refer to Chapter 2, “Interface”, to learn how to specify a browser to preview your pages.

Next, you will create some links using text. The process is almost identical, except you will be select-ing text instead of images.

04 DW MX HOT (088-121)vR3 10/15/02 10:13 PM Page 116

Page 31: Sample Hands-On-Training Chapter – Review Copy Only Copyright …files.lynda.com/.../EDU_HOT_CHAPTERS/DW_MX/DW_MX_Chap_04.pdf · 2011. 7. 29. · Page section. This tells Dreamweaver

Dreamweaver MX H•O•T | 4.Basics

| 117 |

8. Highlight the words art of bonsai in the lower-left corner of the page.

9. Click the Browse for File icon in the Property Inspector.

10. Browse to chap_04/art_of_bonsai/index.html. Click OK.

11. Repeat this process for each phrase in the text navigation bar at the bottom of the screen. Be sureto link the text at the bottom of the page to the same page as the corresponding images.

As you create the text links, you will notice the color of the text change. This happens because youset the Links color option in the Page Properties to red and Dreamweaver MX is previewing thatsetting for you.

04 DW MX HOT (088-121)vR3 10/15/02 10:13 PM Page 117

Page 32: Sample Hands-On-Training Chapter – Review Copy Only Copyright …files.lynda.com/.../EDU_HOT_CHAPTERS/DW_MX/DW_MX_Chap_04.pdf · 2011. 7. 29. · Page section. This tells Dreamweaver

4.Basics | Dreamweaver MX H•O•T

| 118 |

12. Highlight the word treebay.com at the bottom of the page.

13. Type http://www.treebay.com into the Link option in the Property Inspector and press Return/Enter. Congratulations, you just created your first absolute link. It’s an absolute link because it beginswith an http header and includes the full address.

14. Save the file. You don’t want to lose any of your work!

15. If you want to preview all of your links, press F12 to launch a browser and try them out. Note: Onlythe links you created on the index.html page will be working. You will learn some effective and fancyways to work with linking in Chapter 5, “Linking.”

04 DW MX HOT (088-121)vR3 10/15/02 10:13 PM Page 118

Page 33: Sample Hands-On-Training Chapter – Review Copy Only Copyright …files.lynda.com/.../EDU_HOT_CHAPTERS/DW_MX/DW_MX_Chap_04.pdf · 2011. 7. 29. · Page section. This tells Dreamweaver

Dreamweaver MX H•O•T | 4.Basics

| 119 |

META Tags

One of the big challenges (aside from building a Web site) is letting the search engines know that yoursite exists. There are two steps to getting your site listed: the first is to list it with all the various searchengines out there, and the other is to insert META tags into your HTML so the search engines can findyou on their own and correctly index your site. Many search engines send robots (also called spiders)out to search the Web for content. When you insert certain META tags into your document, you makeit much easier for the search-engine robots to understand how to categorize your site. This exerciseshows you how to enter META tags with specific attributes, so you can make your Web page moresearch-engine friendly.

8.

1. In the Insert panel, click the Head tab. This panel contains several elements that areplaced within the HEAD tag of a page, such as META elements.

2. Click the Keywords icon. A dialog box will be displayed for you to enter in the keywordsfor your page.

3. Type bonsai, bonsai supplies, learn how to bonsai, bonsai images, bonsai tools.Basically, you’re listing words that someone might use in a search engine to bring up your site.

4. Click OK.

04 DW MX HOT (088-121)vR3 10/15/02 10:13 PM Page 119

Page 34: Sample Hands-On-Training Chapter – Review Copy Only Copyright …files.lynda.com/.../EDU_HOT_CHAPTERS/DW_MX/DW_MX_Chap_04.pdf · 2011. 7. 29. · Page section. This tells Dreamweaver

4.Basics | Dreamweaver MX H•O•T

| 120 |

5. Click the Description button. A dialog box will appear in which you can enter the description of yourWeb page.

6. Type A great place to learn more about bonsai. Learn how to bonsai and see a whole galleryof bonsai photos.

7. Click OK.

8. Click the Show Code View button to view the HTML in this document. See the META informationinside the HEAD tag? Visitors to your site won’t be able to see the META tag information because it’sonly visible inside your HTML. It’s a part of authoring the page that has nothing to do with appearance—and everything to do with helping the search engines find your site.

Show Code View

04 DW MX HOT (088-121)vR3 10/15/02 10:13 PM Page 120

Page 35: Sample Hands-On-Training Chapter – Review Copy Only Copyright …files.lynda.com/.../EDU_HOT_CHAPTERS/DW_MX/DW_MX_Chap_04.pdf · 2011. 7. 29. · Page section. This tells Dreamweaver

Dreamweaver MX H•O•T | 4.Basics

| 121 |

9. Save and close this document.

Onward ho! You just built a page, colored it, set links, and added META tags all in one chapter.Future chapters will reveal even more powers of Dreamweaver MX, so keep on reading!

WARNING | Keyword and Descriptions

Keywords are META tag values that specify certain words to help Internet search engines indexyour site. Many search engines limit the number of keywords you can use. Choose your wordswisely and use no more than 10 to 15 keywords that best describe your site’s contents.

Descriptions are META tag values that also help various search engines index your site. Somesearch engines will actually use in their directory the very descriptions you specify to describeyour site. Again, some search engines limit the number of characters indexed, so keep it shortand simple! If you would like more information about META tags, check out these URLs:

Web Developer: META Tag Resourceshttp://www.webdeveloper.com/html/html_metatag_res.html

Search Engine Watchhttp://searchenginewatch.com/webmasters/meta.html

04 DW MX HOT (088-121)vR3 10/15/02 10:13 PM Page 121