How to set default attributes that apply to every new page automatically
Modifying the default file to increase productivity
The default.html file in Dreamweaver dictates how a page will appear when selecting File > New. Before modification, the page is set to a white background with black text, generic link colors, and no page title. However, a designer may want to impose differentreoccurring attributes. For example, a Web site may be designed so that every page has a black background and light green text. By changing the default.html file in Dreamweaver, each new document opens with the new attributes assigned, eliminating the need to set the page properties repetitively.
The default.html file resides inside the Dreamweaver application folder, within the Configuration folder, in a folder called Templates. This file is part of the application and is installed with Dreamweaver. It should not be confused with the template files (DWT files) that are created when using Dreamweaver's Save as Template feature. It is important to understand that DWT files are specific to a particular site and reside inside the local root folder, in a folder called Templates, while default.html dictates how the page will appear when selecting File > New and resides in the Dreamweaver > Configuration > Templatesfolder.In order for the files to function correctly, both the default.html and the DWT files must remain in their respective folders.
Note:It is important not to modify any file in any Configuration folder other than default.html. To alter a file might impair Dreamweaver's functionality.
Before modification, the default.html file has the following attributes:
| Page Property |
Hexadecimal Color Assigned | |
| Page Title | = | Untitled Document |
| Background Image | = | None specified |
| Background Color | = | #FFFFFF |
| Text Color | = | #000000 |
| Link Color | = | #0000CC |
| Visited Link Color | = | #663399 |
| Active Link Color | = | #FF0000 |
| Left/Top Margin,
Margin Width/Height |
= | Left = 8 pixels, Top = 11 pixels
Width = 8 pixels, Height = 11 pixels |
| Document Encoding | = | Western (Latin 1) |
| Tracing Image | = | None specified |
To set new attributes for the default.html page, do the following:
| 1 | In Dreamweaver, open the default.html file. Choose File > Open. Browse to the Dreamweaver application folder, to the Configuration folder, and then to the Templates folder. Select default.html. |
| 2 | Choose Modify > Page Properties. In the Page Properties dialog box, select the desired page attributes.When finished, click OK to close the dialog box. Note:It is not possible to set default attributes for the Background Image or Tracing Image because these items create a path to the specific file. Due to the way the application passes the information from the default.html to the new file, the link between the file and the new page will be broken. |
| 3 | Text, tables, links (using absolute paths), horizontal rule and layers can also be added to the page in the Document window. The text can beset to a specific alignment, color, style, font, size and format. Note:To set a specific text attribute so that each new page can have text that is formatted automatically, type a small amount of text into the Document window. Select the characters and apply the desired attributes in the Property inspector. Each new page will contain this word in the document. Simply highlight the word and type or copy over it to add unique text without having to set the text properties each time. |
| 4 | As stated above, relative links will not work, due to the location of the default.html file (which resides in the application folder, outside of the local root folder). For this reason, images, assets, and any other element with a relative path inserted into the default.html will have a broken link in the resulting new pages. |
This content requires Flash
To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.
Download the free Flash Player now!
