- Creating a New Page and Adding Text
- Setting Page Properties
- Introducing Cascading Style Sheets
- Changing Text Attributes in the Property Inspector
- Aligning Text
- Creating Lists and Indenting Text
- Adding a Separator to a Page: The Horizontal Rule
- Saving Your Work and Previewing in a Browser
- Summary
- Q&A
- Workshop
- Exercises
Setting Page Properties
You can also set global page properties, such as the default font and font size for all the text on the page. In addition, you can set the page title in the page properties. To get started, select Modify, Page Properties to open the Page Properties dialog box.
The Page Properties dialog box, shown in Figure 3.4, has five property categories listed in the left column: Appearance, Links, Headings, Title/Encoding, and Tracing Image. Next you’ll learn about the property settings in the Appearance, Headings, and Title/Encoding categories; the Links category settings will be covered in Hour 5, "Setting Lots o’ Links: Hyperlinks, Anchors, and Mailto Links," and the Tracing Image category will be covered in Hour 13, "Designing Page Layout Using Tables." You simply click on one of the categories in order to modify its property settings.
Figure 3.4 The Page Properties dialog box enables you to set properties for the entire web page.
Setting Global Page Appearance
You use the settings in the Appearance category of the Page Properties dialog box to set the text font, size, and color, along with several other settings, for the entire web page. For instance, the text on a web page is black by default. You can change the default text color on the web page by changing this setting in Page Properties.
Setting the Global Page Font and Size
Select the Appearance category in the Page Properties dialog box by clicking the category name on the left side of the dialog box. You can select the default Page Font for the entire page along with the default text size and color. These settings may be overridden by any local text setting, such as the settings you’ll apply later this hour.
To set the default font properties, follow these steps:
In the Page Properties dialog box, select the font family you want from the Page Font drop-down menu.
You can also set the default text to be bold, italic, or both.
Select the font size in the Size drop-down menu. If you select a numeric font size, you also need to select a unit type, such as points or pixels.
Click the Apply button at the bottom of the Page Properties dialog box in order to view the font changes you’ve changed so far. You might have to adjust the position of the Page Properties dialog box so it isn’t blocking your view. The Apply button enables you to view your changes without closing the Page Properties dialog box.
Setting the Global Text Color
In a number of areas in Dreamweaver, you can change the color of an object or text. In HTML, colors are specified by using a hexadecimal numbering system, but if you don’t know the hexadecimal translation of the color you’d like to use, you can use Dreamweaver’s color picker. You access the Dreamweaver color picker by clicking on the color picker box, shown in Figure 3.5. Dreamweaver’s color palette appears.
You can experiment picking a color by using the color picker in a number of ways:
Pick one of the available color swatches by clicking it with the eyedropper.
By default the Color Cubes palette is displayed. You can select one of the five other panels: Color cubes, Continuous tone, Windows OS, Mac OS, and Grayscale.
Use the eyedropper to pick up any color onscreen by simply clicking the eyedropper on it. You can pick up any color on the computer screen, not just colors in Dreamweaver. Try selecting a color from one of the icons in the Insert bar. You’ll need to arrange Dreamweaver so that you can see other Windows and click the eyedropper on the colors.
Figure 3.5 Select the color picker to open Dreamweaver’s color palette.
Select the System Color Picker button to create a custom color as shown in Figure 3.6. This opens the system color picker, where you can either pick one of the basic colors or click anywhere in the color spectrum to mix your own color. Click the Add to Custom Colors button and then click the OK button to use the color.
You can also type the color information directly into the color text box in the Property inspector:
Colors are represented in HTML by three hexadecimal numbers preceded by the pound (#) sign. For instance, the hexadecimal RGB (red, green, blue) value for light blue is represented as #0099FF, where the value for R is 00, the value for G is 99, and the value for B is FF. If you know the hexadecimal value for a color, you can simply type it in.
Most browsers display standard color names in addition to hexadecimal values. For instance, you could type in red instead of #FF0000.
To clear the current color without picking another color, click the Default Color button in the color picker.
Figure 3.6 The System Color Picker enables you to mix your own custom colors on either a Windows (left) or Macintosh OS X (right) computer.
Setting the Background Color and Background Image of a Web Page
You can set the background color of an entire page in the Appearance category of the Page Properties dialog box. For example, if you’d like to set the web page background color to white, you can enter the hexadecimal color code (#FFFFFF) into the Background Color text box, type white into the box, or use the color picker. Of course, you can pick any color that you want as the background color, but make sure that the combination of the background color and the text color doesn’t make your web page difficult to read. If you apply a dark background color, you need to use a light text color for contrast so the viewer can easily read the text.
You can also set a background image for a web page. This image is tiled both vertically and horizontally on the page. In order for the web page background to really look nice, you should find or create an image especially designed as a web page background. You can find these specially designed background images on the Web or in image galleries that you purchase. A background image should never interfere with the readability of a page.
To add a background image, select the Browse button and navigate to an image file saved on your hard drive. The image needs to be saved in the GIF, JPEG, or PNG formats (you’ll learn more about image format in Hour 7, "Displaying Images"). Click the OK button. You might receive a message from Dreamweaver that a file:// path will be used until you save your document. Just click OK; Dreamweaver automatically corrects that path after you save the web page.
Setting the Page Margins
Margins set the amount of space between the contents of the web page and the edges of the browser window. You set the margins for a page in the Page Properties dialog box. The default setting for page margins varies from browser to browser so it’s impossible to predict the amount of white space visible around the border of your web page design. You can change the page margins by entering values into the margin boxes, as shown in Figure 3.7. There are four page margin settings: Left Margin, Top Margin, Right Margin, and Bottom Margin. Many web designers set the Left and Top Margin settings to 0 pixels so the design is snug to the upper-left corner in the browser window.
Figure 3.7 Set the page margins, the space between your web page design and the edge of the browser window, in the Page Properties Appearance category.
Setting Global Heading Properties
You create a Heading by selecting one of the heading formats, Heading 1 through Heading 6, in the Format drop-down menu in Dreamweaver’s Property inspector. In the Headings category of the Page Properties dialog box, you can set global properties for these headings, as shown in Figure 3.8. You can select a Heading Font for all six of the sizes of headings. You can also set a unique font size and color for each of the heading sizes.
Figure 3.8 Set the global heading properties in the Headings category of the Page Properties dialog box. You can set a font for all of the heading sizes and then specify font sizes for each size individually.
To set how Heading 1 will appear, follow these steps:
Select Modify, Page Properties if you don’t already have the Page Properties open. You should already have some text set to Heading 1 on the page.
Select a default font for all of the headings by selecting one of the fonts beside the Heading font setting. You can also select the Bold or Italic button if you’d like.
Select a large font size beside Heading 1. A good size to try is 36 pixels. You can also change the color by clicking on the color picker in the Heading 1 settings.
Click the Apply button (refer to Figure 3.4) to apply your changes without closing the Page Properties dialog box.
Adding a Page Title
The Title/Encoding category of the Page Properties dialog box enables you to set the document title of your web page along with the Document and Encoding Types. The title of your web page is important because it appears in the title bar of the browser when someone views your web page. This same title is also saved to a user’s browser Bookmarks or Favorites list when she saves the address of your site; therefore, you should make it meaningful and memorable.
To add a title to a document, follow these steps:
Select Modify, Page Properties if you don’t already have the Page Properties dialog box open.
Select the Title/Encoding category.
Type a descriptive title in the title box at the top of the Page Properties dialog box.
Click the OK button to save the settings. The page title appears in the Document Title textbox in the Document toolbar, as shown in Figure 3.9. You can always add the title in this textbox instead of opening the Page Properties dialog box.
Figure 3.9 The document title appears in the Document Title textbox after you enter it in the Page Properties dialog box.
Dreamweaver automatically adds a tag (the <>) at the top of each web page describing the document type for the browser. This tag tells the browser the flavor of HTML that your web page is written in and helps the browser interpret the page. By default, Dreamweaver applies the XHTML 1.0 Transitional document type, which is a good choice because XHTML is an up-and-coming standard and the transitional version of XHTML enables old browsers to still view the web page. XHTML is written in XML (extensible markup language) and enables you to create web pages that are ready for the next generation of websites that are viewable in browsers and also on other devices, such as TVs or cell phones.
There are various alphabets in the world, and using the Encoding command is how you tell a web browser which one you are using for your web page. By default, Dreamweaver lists the Western European encoding type used in the United States and Europe. If you create a page using another alphabet, you need to change the Encoding setting. You can change Dreamweaver’s default encoding type in the New Document category in Dreamweaver’s Preferences dialog box (Edit, Preferences).