14. Viewing the HTML Behind the Page

Introduction

In the world of the Internet, the graphics, text, animation, and all the “stuff” that the visitor sees displayed in their browser is the front end of a Web page, and the power behind the page is the HTML code. The HTML code sits quietly behind the scenes, letting the front end get all the credit; however, without the code, the Internet would fall apart. It’s the cosmic glue that holds the whole thing together.

Designers, like myself, remember when there were no graphical design interfaces (like Dreamweaver), and all Web pages were designed code line, by tedious code line. I remember working by candlelight into the wee hours of the morning, until I thought my head was going to burst... okay, so maybe I didn’t use candles, but it was a lot of painstaking work. Although Dreamweaver changed all of that with its intuitive graphical design interface, the code is still there. However, we’re not the ones doing the coding, Dreamweaver is... and isn’t that nice?

Understanding HTML

HTML stands for the HyperText Markup Language. HTML code is the major language of the Internet’s World Wide Web. Web sites and Web pages are written in HTML code. With HTML code and the World Wide Web, you have the ability to bring together text, pictures, sounds, and links... all in one place! HTML code files are plain text files, so they can be composed and edited on any type of computer... Windows, Mac, UNIX, whatever.

HTML documents look a lot like word processing documents. You can have text that’s bold and italicized, larger and smaller, or it can look typewritten. The HTML code might look something like this:

You can have <b>bold</b> and <i>italicized</i>, <font size=+2>Larger</font> and <font size=-2>Smaller</font>, or it could look <tt>type-written</tt>.

Most HTML code is enclosed within braces < >, and when you place the code between the braces it’s said to be a tag. An HTML tag is code inserted in a document that specifies how the document, or a portion of the document, should be formatted. For example, the <b> tag is saying to start bold text, and the </b> tag is saying to stop bold text. The tag with the slash (/) is known as the closing tag. Many opening tags require a following closing tag, but not all do. Tags make up the entire structure of an HTML document.

HTML files are just normal text files; they usually have the extension of .htm, .html, or .shtml. HTML documents have two parts, the head and the body. The body is the larger part of the document, as the body of a letter you would write to a friend. The head of the document contains the document’s title and similar information, and the body contains most everything else.

Here’s an example of a basic HTML document:

   <html>
   <head><title>Title goes
here</title></head><body>Body goes here</body>
   </html>


You may find it easier to read if you add extra blank lines such as follows...

   <html>
   <head>
   <title>Title goes here</title>
   </head>
   <body>
   Body goes here
   </body>
   </html>


Extra spaces and line breaks (blank lines) are ignored when the HTML is interpreted (displayed) by a Web browser, such as Microsoft Explorer or Apple Safari... so add them if you wish.

When working with HTML code, it’s all about the tags. The HTML tags instruct the text how to look and how it’s formatted. In addition, tags control graphics, animation, in short... everything. For example the following uses the <b> or bold tag:

Common Tags

The cow jumped <b>OVER</b> the moon.


When displayed within a browser it would look like this:

   The cow jumped OVER the moon.


The start tag <b> instructs the text following the tag to use boldface; the end tag </b> instructs the text to stop boldface and return to normal.

Common Tags

Using Code View

Using Code View

DW 5.2, 5.5

Dreamweaver utilizes three document views: Design, Split, and Code. The Design view gives you a real-time view of your design, the Split view gives you a look at the visual and the code, and the Code view gives you a straight look at the HTML code of your Web page. When you work in the Code view, you’re going back to the basics of Web design... the actual code that makes it all happen. Some designers never look at the code, and some designers claim that you can’t be good at creating Web pages without knowing the code. To be honest, I’m in the second camp. I believe that to really understand the design of a Web page, you need to know how the code makes a page function. Only then do you have complete control over the design of the page. Of course, I could be wrong...

Access the Code View

Access the Code View Open the Web page you want to view code.

Access the Code View

Access the Code View Access the Code view using one of the following methods:

Code View. Click the View menu, and then click Code, or click the Code View button on the document window.

Split View. Click the View menu, and then click Split, or click the Split View button on the document window.

Split Code View. Click the View menu, and then click Split Code.

Dreamweaver’s document changes to display the code of the current page.

Did You Know?

You can adjust the size of the panes in Split view. Drag the splitter bar located between the two panes. When you adjust the pane, Code view updates automatically.

View Code in a Separate Window Using Code Inspector

View Code in a Separate Window Using Code Inspector Open the Web page you want to view code.

View Code in a Separate Window Using Code Inspector

View Code in a Separate Window Using Code Inspector Click the Window menu, and then click Code Inspector.

View Code in a Separate Window Using Code Inspector Use the toolbar to select from the following options:

File Management. Get, put, check in or check out a file.

Preview/Debug In Browser. Preview or debug the file in a browser or Device Central.

Refresh Design View. Refreshes Design view to reflect code changes in Code view.

Reference. Opens the Reference panel.

Code Navigation. Allows you to move quickly in the code.

View Options. Allows you to change the way code appears in Code view.

View Options.

View Options. When you’re done. click the Close button.

Did You Know?

You can use the coder-oriented workspace. The workspace displays the panel groups docked on the left side of the main window, and the Document window appears in Code view. The Properties panel is collapsed. Click the Window menu, point to Workspace Layout, and then click Coder.

Using Code Live View

Using Code Live View

DW 5.2

As you work in Live view, you can also view live code (New!). Similar to Live view, Live Code view is a non-editable view. Live code view appears displaying the code that the browser uses to execute the page. The non-editable code is highlighted in yellow. If you want to edit the code, all you need to do is return to Live view, and then switch to Code view, which is editable. After making your code changes, you can return to Live view and then refresh it to see your changes.

Access Live Code View

Access Live Code View Open the Web page you want to view.

Access Live Code View

Access Live Code View Switch to Design view or Code and Design view.

Access Live Code View Click the Live View button.

Access Live Code View To go to Live Code view, click the Live Code button.

Live code view appears displaying the code that the browser uses to execute the page. The non-editable code is highlighted in yellow.

Access Live Code View To return back to Live view, click the Live Code button again.

Access Live Code View

Access Live Code View To return back to Design view, click the Live View button again.

Did You Know?

You can print code. Open the Web page you want to print in Code view, click the File menu, click Print Code, specify the options you want, and then click OK (Win) or Print (Mac).

Setting Code View Options

Setting Code View Options

DW 5.1, 5.2

You can select Code view options to change the way code appears in Code view. When you select the Code View Options command on the View menu or click the View Options button on the Code toolbar, you can set options to set word wrapping, display line numbers, hide characters, highlight invalid code, color code, indent code automatically, and display syntax error alerts in the Info bar (New!).

Use Code View Options

Use Code View Options Open the Web page you want to view code.

Use Code View Options

Use Code View Options Switch to the Code view.

Use Code View Options Click the View Options button on the document toolbar, and then select from the following options:

Word Wrap. Forces the HTML code to wrap, based on the width of the Code view window.

Line Numbers. Displays line numbers to the left of the HTML code.

Hidden Characters. Displays hidden code elements, such as tabs and character returns.

Highlight Invalid Code. Highlights any code that Dreamweaver considers incorrect.

Syntax Coloring. Colorizes the HTML code, to visibly separate it from the text.

Auto Indent. Automatically indents the HTML code to aid in readability.

Syntax Error Alert in Info Bar. Displays syntax code error alerts in the Info bar (New!).

Entering HTML Code

You can enter HTML code in Code view like you are typing text into a word processor. However, when you type HTML code, it uses a specific structure and layout. As you type, the Code Hints popup menu appears to help you enter correct HTML code tag names, attributes, and values as you type code in Code view or the Quick Tag Editor. For example, when a tag requires the selection of a color, Dreamweaver displays a color palette. When a font is required, a font list is automatically displayed, and when a file is required a browse button magically appears allowing you to select and insert the file. If a page does contain invalid code, it appears in Design view and optionally highlights in Code view. When you select the invalid code, the Properties panel displays information as to why the code is invalid and steps to fix it.

Enter HTML in Code View

Enter HTML in Code View Open the Web page you want to view code.

Enter HTML in Code View

Enter HTML in Code View Switch to the Code view.

Enter HTML in Code View Click to the right of a tag and press Enter to create a space between the opening and closing body tag.

Enter HTML in Code View Enter the HTML code you want on the new line.

Code Hints. When you type the left brace “<” the Code Hints popup menu appears, listing all possible HTML codes. Begin entering in the code name, and Code Hints will display the correct code. Double-click it or select it and press Enter (Win) or Return (Mac) to add the tag.

Timesaver

Press Control+Spacebar to display a Code Hints menu or press Esc to close the Code Hints menu.

Timesaver To indent the selected code, press Tab; to outdent the selected code, press Shift+Tab.

Timesaver To add a closing tag, type a left brace and forward slash “</”, and Dreamweaver will automatically insert the correct closing tag.

Timesaver To remove a tag, right-click in the tag, and then click Remove Tag.

Using Code Hints

Code hints makes it easy to insert and edit code accurately in a variety of languages. Dreamweaver supports code hinting for the following languages and technologies: HTML, CSS, DOM, JavaScript (New!), Ajax (New!), Spry, Adobe ColdFusion, JSP, PHP MySQL, ASP JavaScript, ASP VBScript, ASP.NET C#, and ASP.NET VB. As you start to type code for a particular code type, the Code Hints popup menu appears to help you enter it correctly. When you type a right angle bracket (<), code hint displays HTML tag names. When you type a period (dot operator) after an object, code hint displays JavaScript code possibilities. Dreamweaver also provides code hinting for your own or third-party custom JavaScript classes that are not built in to the language. If Dreamweaver detects problems with your code, code hints doesn’t always work properly. Use the Syntax Error Information Bar to help you fix the code problems.

Use Code Hints

Use Code Hints Open the Web page you want to view code.

Use Code Hints

Use Code Hints Place the insertion point where you want to add code.

Use Code Hints Start to type the code you want or press Control+Spacebar to manually display the code hints menu.

Use Code Hints Scroll through the list by using the scroll bar or pressing the Up Arrow and Down Arrow keys.

Use Code Hints To insert a code hint, double-click an item, or select it and then press Enter (Win) or Return (Mac).

Press Backspace (Win) or Delete (Mac) to dismiss the list of code hints.

Use Code Hints To edit code, delete the code, and then start typing what you want to use code hints.

See Also

See “Setting Code Hint Preferences” on page 343 for more information on setting options for code hints.

Working with HTML Head Tags

Working with HTML Head Tags

DW 5.3

Each page contains information about the document in the head section. You can set the properties of head elements to control how your pages are identified on the Web by search browsers. You can insert the following head tags: meta, keywords, description, refresh, base, or link. A meta tag records information about the current page, such as encoding, author, copyright, or keywords. The keywords and description tags record information many search engines, such as Google or Yahoo, look for to create an index for your page for use in their search results databases. For the best results, specify a few descriptive keywords and a short description for a page. The refresh tag specifies the amount of time before the page is refreshed in a browser. The base tag sets the base URL that all document-relative paths in the page use. The link tag defines a relationship between the current page and another file. After you insert a head tag, you can always make changes and adjustments by using the head content, selecting the head element, and making changes in the Properties panel.

View and Insert Head Tags

View and Insert Head Tags Open the Web page you want to view and change head properties.

View and Insert Head Tags

View and Insert Head Tags To insert head tags, click the Insert menu, point to HTML, point to Head Tags, and then select the tag you want: Meta, Keywords, Description, Refresh, Base, or Link.

View and Insert Head Tags Enter the information or specify the options you want, and then click OK.

View and Insert Head Tags

View and Insert Head Tags Click the View menu, and then click Head Content.

View and Insert Head Tags To edit an element, click one of the icons in the head section to select it, and then change the properties you want in the Properties panel.

Did You Know?

You can check for balanced tags and braces. In Code view, click to place the insertion point where you want to check, click the Edit menu, and then click Select Parent Tag or Balance Braces. You can select the commands again to check the next level out.

Inserting HTML Comments

If you’re writing large sections of code or working with other people to develop a site, it’s important to insert comments into your HTML code. An HTML comment is descriptive text that explains the purpose and process for the page’s code. The comment text only appears in Code view; the information is for internal development purposes only. You can insert comments in Code view or Design view. After you insert a comment, you can edit it directly in Code view, or select the comment marker and make changes in the Properties panel.

Insert HTML Comments

Insert HTML Comments Open the Web page you want to insert comments.

Insert HTML Comments

Insert HTML Comments Click to place the insertion point where you want to insert a comment (in Code or Design view).

Insert HTML Comments Click the Insert menu, and then click Comment.

Insert HTML Comments Type the comment you want.

Insert HTML Comments Click OK (in Design view).

Insert HTML Comments

Did You Know?

You can change the code using the Selection submenu. Select the code you want in Code view, right-click (Win) or control-click (Mac) it, point to Selection, and then click the selection command you want.

You can copy and paste code. Copy the code from Code view or from another program, click to place the insertion point in Code view where you want to paste the code, click the Edit menu, and then click Paste.

See Also

See “Working with Invisible Elements” on page 88 for information on displaying comment markers in Design view.

Using the Coding Toolbar

When you switch to Code or Split view, the Coding toolbar appears along the left side of the Code view pane. The toolbar provides easy access to the most common coding related commands. If the Code view pane is not large enough, an expander arrow appears, which you click to access additional buttons. Some of the tools allow you to collapse and expand the content between a set of opening and closing tags, select tags, insert and remove comments, format code, and highlight invalid code.

Use the Coding Toolbar

Use the Coding Toolbar Open the Web page you want to view code.

Use the Coding Toolbar

Use the Coding Toolbar Switch to the Code view.

Use the Coding Toolbar Click to place the insertion point in the code or select a block of code.

Use the Coding Toolbar Click the button you want on the Coding toolbar:

Open Documents. Displays a list of open documents. Click the one you want to open it.

Show Code Navigator. Displays the Code Navigator in the code (New!).

Collapse Full Tag. Collapses the content between a set of opening and closing tags. You need to place the insertion point in the opening or closing tag.

Collapse Selection. Collapses the selected code.

Expand All. Restores all collapsed code.

Select Parent Tag. Selects the code tag immediately outside of the line with the insertion point.

Balance Braces. Selects the code tag and surrounding parentheses, braces, or square brackets of the line with the insertion point.

Line Numbers. Shows or hides the numbers at the beginning of each line of code.

Highlight Invalid Code. Highlights invalid code in yellow.

Syntax Error Alerts in Info Bar. Displays syntax code error alerts in the Info bar (New!).

Apply Comment. Inserts comment tags around the selected code, or opens new comment tags.

Remove Comment. Deletes comment tags from the selected code.

Wrap Tag. Wraps selected code with the selected tag from the Quick Tag Editor.

Recent Snippets. Inserts a recently used code snippet from the Snippets panel.

Move or Convert CSS. Moves CSS to another location or converts inline CSS to CSS rules.

Indent Code. Shifts the selection to the right.

Outdent Code. Shifts the selection to the left.

Format Source Code. Displays options to apply source code formatting to selected code, or to the entire page if no code is selected. You can also access Code Format Settings from the Preferences dialog box or the Tag Library Editor.

Format Source Code.

Timesaver

You can perform many of these same commands on the Insert panel.

See Also

See “Moving CSS Rules” on page 228 for information on moving CSS rules to a style sheet.

Using Quick Tag Editor

Using Quick Tag Editor

DW 4.4, 5.3

Creating Web documents in the Design view is a beautiful and elegant way to design Web pages; however, sometimes you just need to get under the hood and make changes directly to the code. Dreamweaver gives you a way to make alterations to the code using the Quick Tag Editor. When activated, the Quick Tag Editor displays as a small pop-up window and allows you to edit a tag, add a tag, or enclose the current selection within a tag. In addition, you can use a list of tags and attributes to help jog your HTML memory, and save you some typing. Dreamweaver’s Quick Tag Editor can be used in three ways: Insert HTML (used for adding new tags and code at the current cursor position), Wrap Tag (wrap one tag around one or more other tags and content) and Edit HTML (displays the entire selected tag with all the attributes). It is a great time-saver for making those small tweaks to the code of any Web document. While most designers will perform most of the creative process using the Design view, it’s nice to know that you have a powerful tool like the Quick Tag Editor when you need to get back to coding basics.

Open the Quick Tag Editor

Open the Quick Tag Editor Open the Web page you want to view code.

Open the Quick Tag Editor

Open the Quick Tag Editor Open the Quick Tag Editor using any of the following methods:

• Click the Modify menu, and then click Quick Tag Editor.

• Use the keyboard shortcut Ctrl+T (Win) or Open the Quick Tag Editor+T (Mac).

• Click the Quick Tag Editor icon in the Properties panel.

Did You Know?

Dreamweaver helps you with the syntax of the code. If you fail to add the quotation marks around a parameter’s value, the Quick Tag Editor will do it for you. If you want to add more than one tag, you can use the right arrow key to move beyond the first set of braces in the Quick Tag Editor. Then, simply enter in a left brace and add the additional tag.

Use Quick Tag Editor in Wrap Tag or Insert HTML Mode

Use Quick Tag Editor in Wrap Tag or Insert HTML Mode Open the Web page you want to view code.

Use Quick Tag Editor in Wrap Tag or Insert HTML Mode

Use Quick Tag Editor in Wrap Tag or Insert HTML Mode Select a portion of text within the document (for Wrap Tag mode) or click in the text area (do not select any text) to place an insertion point (for Insert HTML mode).

Use Quick Tag Editor in Wrap Tag or Insert HTML Mode Open the Quick Tag Editor.

Use Quick Tag Editor in Wrap Tag or Insert HTML Mode Use the HTML tags in the pop-up hint list to insert a tag, or manually enter a customized XML tag.

Use Quick Tag Editor in Wrap Tag or Insert HTML Mode Press Enter (Win) or Return (Mac) to wrap the selected text with the tag.

Use Quick Tag Editor in Edit Tag Mode

Use Quick Tag Editor in Edit Tag Mode Open the Web page you want to view code.

Use Quick Tag Editor in Edit Tag Mode

Use Quick Tag Editor in Edit Tag Mode Select a complete tag in Code view (e.g., img), or select an object, such as an image, in Design view.

Use Quick Tag Editor in Edit Tag Mode Open the Quick Tag Editor.

Use Quick Tag Editor in Edit Tag Mode The tag with all its attributes will be displayed within the Quick Tag Editor window.

Use Quick Tag Editor in Edit Tag Mode Manually enter any changes to the tag and attributes.

Use Quick Tag Editor in Edit Tag Mode Press Enter (Win) or Return (Mac) to add the tag to the document.

Using the Tag Inspector

Using the Tag Inspector

DW 5.3

Dreamweaver’s Tag Inspector gives you control over your code by displaying a collapsible outline of the tags used on the current page. This feature allow you to quickly determine if tags are correctly nested, and to view and change tag attributes. For example, you may want to change the attributes of the <body> tag, or change the overall color and size of the default font; both these and many more options are available using the Tag Inspector. When selected, the Tag Inspector displays a collapsible structure of all the attributes within the selected Web element. This view gives you an overall view of the code and how it’s laid out. When you select a tag, all the attributes for that tag are displayed for you to view and edit.

Access the Tag Inspector

Access the Tag Inspector Open the Web page you want to view in the Tag Inspector.

Access the Tag Inspector

Access the Tag Inspector Make a selection using one of the following methods:

Code View. Select a specific HTML tag or section of text.

Split View. Select a HTML tag in the Code pane or select an object in the Design pane.

Design View. Select an object in the window, or create a selection of text.

Design View. Click the Window menu, and then click Tag Inspector to display the Tag Inspector.

Design View. Select from the following views:

Category View. Displays a list of general categories within collapsible headings. Click the plus (+) or minus (-) sign icon to display all available attributes.

List View. Displays a list of all available attributes for the selected Web element.

List View. Select the attribute that you want to add or modify, and enter the correct value in the input field.

List View. Press the Enter key to record your changes.

Using the Tag Chooser

Using the Tag Chooser

DW 5.3

The Tag Chooser allows you to insert any tag from the Dreamweaver tag libraries in your page. A tag library is a collection of tags for a certain type that contains tag information, code hints, target browser checks, and other features. You can insert tags from the following types: HTML, CFML, ASP.NET, JSP, JRun custom library, ASP, PHP, and WML. If you are looking for a specific tag in a specific category, the Tag Chooser can help you insert it into your code with the right syntax.

Insert Tags Using the Tag Chooser

Insert Tags Using the Tag Chooser Open the Web page you want to insert a tag using the Tag Chooser.

Insert Tags Using the Tag Chooser

Insert Tags Using the Tag Chooser Click to place the insertion point in the code where you want to insert a tag.

Insert Tags Using the Tag Chooser Right-click (Win) or control-click (Mac) near the insertion point, and then click Insert Tag.

Insert Tags Using the Tag Chooser Select a category of tags from the tag library, or expand the category and select a subcategory.

Insert Tags Using the Tag Chooser

Insert Tags Using the Tag Chooser Select a tag from the right pane.

Insert Tags Using the Tag Chooser To view syntax and usage information for the selected tag, click Tag Info.

Insert Tags Using the Tag Chooser To insert the selected tag into your code, click Insert.

Insert Tags Using the Tag Chooser If a tag requires more information, enter the required information in the tag editor, and then click OK.

Insert Tags Using the Tag Chooser Click Close.

Did You Know?

You can add or remove tags, attributes, and libraries from the Tag Library. Click the Edit menu, click Tag Libraries, click the Plus (+) or Minus (-) buttons to select commands to add or remove tags, attributes, and libraries.

Navigating to Related Code

Code Navigator (New!) displays a list of linked code sources related to a part of a page. The related codes sources include internal and external CSS rules, server-side includes, external JavaScript files, parent templates files, library files, and iframe source files. When you click a linked code source, the file appears in the related files area (if enabled) or opens as a separate file in the Document window. If the code source is an internal CSS rule, the rule appears in Split view. You can open Code Navigator from Design, Code, and Split views and the Code Inspector.

Open the Code Navigator

Open the Code Navigator Open the Web page you want to view.

Open the Code Navigator

Open the Code Navigator Alt-click (Win) or command-option-click (Mac) anywhere on the page.

• You can also click the Code Navigator indicator icon to open the Code Navigator. The Code Navigator indicator icon appears near the insertion point when the mouse remains idle for 2 seconds.

The Code Navigator displays links to the code related to the section of the page you clicked. The code sources are grouped by file and listed alphabetically.

Open the Code Navigator Click a link to display it in the related files area or open it as a separate file in the Document window.

Open the Code Navigator

Open the Code Navigator To close the Code Navigator, click outside of it.

Did You Know?

You can enable or disable the Code Navigator indicator. Alt-click (Win) or command-option-click (Mac) on a page, select or clear the Disable Indicator check box, and then click outside to close the Code Navigator.

Opening Related Files

Opening Related Files

DW 2.2

If you have a related file attached to a document, you can use the Related Files toolbar (New!) to quickly open it while keeping the main page available. When the Enabled Related Files option is selected in General Preferences, Dreamweaver displays the names of all files related to a main document in a Related Files toolbar. The related files include external CSS rules, server-side includes, external JavaScript files, parent templates files, library files, and iframe source files. The file named buttons on the Related Files toolbar appear in the order in which the related files appear in the main document. In addition, when you click a linked to a code source file in the Code Navigator, the file appears in the related files area (if enabled).

Open Related Files

Enable or Disable Related Files. Click the Dreamweaver (Mac) or Edit (Win) menu, click Preferences, click General, select or clear the Enable Related Files check box, and then click OK.

Open a Related File. Click a file named button on the Related Files toolbar.

Open a Related File.

Open a Related File as a Separate File. Right-click (Win) or Control-click (Mac) a file named button on the Related Files toolbar, and then click Open as Separate File.

Return to the Main Document Source Code. Click the Source Code button on the Related Files toolbar.

Return to the Main Document Source Code.

Using the Reference Panel

It doesn’t matter whether you’re an experienced Web designer, or a newcomer to the field. Sooner or later you’re going to need a bit of help, in the form of reference material. I’ll admit that I’m a big reader... I love to read. I have a library full of books on creativity and design. Unfortunately, I can’t carry all those books with me when I’m on a lecture tour. That’s why one of my favorite features in Dreamweaver is the Reference panel. The Reference panel gives you instant (on screen) access to 10 O’Reilly reference manuals, 2 Adobe manuals, and a UseableNet Accessibility Reference. Now that’s a lot of reading material, and instant information at your fingertips. For example, you’re coding a page, and you need a bit more information on the HTML body tag... it’s there, or you need a bit of help with the new syntax of XHTML... it’s there. As a matter of fact, when you first open the Reference panel, the information displayed is based on the selected element on the active Web page.

Access the Reference Panel

Access the Reference Panel Open Dreamweaver (do not open a document).

Access the Reference Panel Click the Window menu, point to Results, and then click Reference.

Access the Reference Panel

Access the Reference Panel Select information based on the following options:

Click the Book popup to select from the list of available reference manuals.

Click the Tag popup to select from a list of available HTML tags.

Click the Select Attribute icon to choose from a list of available attributes for the selected tag.

The reader window displays the information based on your selections.

Access Specific Information

Access Specific Information Open the Web page you want to access specific information.

Access Specific Information

Access Specific Information Perform one of the following:

Code View. Select a specific HTML tag, CSS style rule, or other HTML text.

Split View. Select an item in the Code pane or select an object or text in the Design pane.

Design View. Select an object, graphic, or portion of text.

Design View. Select the element for which you want specific information.

Design View. Press Shift+F1 (Shortcut for accessing the Reference panel).

The panel opens and displays information about the selected page element.

Did You Know?

You can search for tags, attributes, or text in code. Click the Edit menu, click Find And Replace, specify the Find in document, select Source Code in the Search popup, enter the text you want to find, enter the replace text (optional), specify any options, and then click the Find or Replace buttons you want.

You can save and reuse searches. Click the Edit menu, click Find And Replace, set the search criteria you want, click the Save Query button (the disk icon), navigate to the folder where you want to save the search, and then click Save. To reuse a search, click the Load Query button (the folder icon), navigate to the folder with the saved search query file, select it, click Open, and then use the Find or Replace buttons you want.

Setting Code Format Preferences

Setting Code Format Preferences

DW 5.1

You can use the Code Format section of the Preferences dialog box to change the way your code looks in Code view. The options you set in the Code Format section, except the Override Case Of option, are automatically applied only to new documents or additions to documents you create in the future. If you want to reformat an existing document, you can use the Apply Source Formatting on the Commands menu.

Set Code Format Preferences

Set Code Format Preferences Click the Dreamweaver (Mac) or Edit (Win) menu, and then click Preferences.

Set Code Format Preferences Click the Code Format category.

Set Code Format Preferences

Set Code Format Preferences Select from the following options:

Indent. Select to have Dream-weaver indent generated code, and then specify how many spaces or tabs to indent.

Tab Size. Specify how many spaces for a tab character.

Automatic Wrapping. Select to insert a line-break character at the end of the column width.

Line Break Type. Select the type of remote hosting server (Windows, Macintosh, or UNIX).

Default Tag Case and Default Attribute Case. Select <lowercase> or <uppercase>.

Override Case Of: Tags and Attributes. Select whether to override your case settings.

TD Tag: Do Not Include A Break Inside The TD Tag. Select to prevent problems with white space and line breaks on older browsers.

Advanced Formatting. Click to set formatting options for CSS code and individual tags and attributes in the Tag Library Editor.

Advanced Formatting. Click OK.

Setting Code Hint Preferences

Setting Code Hint Preferences

DW 5.1

You can use the Code Hint section of the Preferences dialog box to set options for the Code Hints popup menu. Code Hints does more than help you type in a simple HTML code tag. It helps you insert tag names, attributes, and values as you type code in Code view or the Quick Tag Editor. For example, when a tag requires the selection of a color, Dreamweaver displays a color palette. When a font is required, a font list is automatically displayed, and when a file is required, a browse button magically appears allowing you to select and insert the file.

Set Code Hint Preferences

Set Code Hint Preferences Click the Dreamweaver (Mac) or Edit (Win) menu, and then click Preferences.

Set Code Hint Preferences Click the Code Hint category.

Set Code Hint Preferences

Set Code Hint Preferences Select from the following check boxes:

Close Tags. Select an option to specify how you want to insert closing tags. The default inserts tags automatically after you type the characters </. You can also insert it after a final bracket >, or not at all.

Options. Select the Enable Code Hints check box to use code hints, and then drag the slider to set the code hints menu delay you want.

Menus. Select the check boxes for the types of code hints you want to display, and clear the others you don’t want.

Important

Even if you disable code hints, you can display a popup hint in Code view by pressing Control+Spacebar.

Important To add or remove tags and attributes, click the Tag Library Editor link.

Important Click OK.

Setting Code Rewriting Preferences

Setting Code Rewriting Preferences

DW 5.1

You can use the Code Rewriting section of the Preferences dialog box to specify how and if Dreamweaver changes your code. Some of the rewriting options allow you to fix invalid nesting and unclosed tags; prevent duplicate names for form objects; ensure attributes values and URLs contain legal characters; and add the right JavaScript tags upon opening active content files. These options have no effect when you edit your code in Code view. If you disable the rewriting options, invalid HTML code that would have been rewritten is displayed in the Document window.

Set Code Rewriting Preferences

Set Code Rewriting Preferences Click the Dreamweaver (Mac) or Edit (Win) menu, and then click Preferences.

Set Code Rewriting Preferences Click the Code Rewriting category.

Set Code Rewriting Preferences

Set Code Rewriting Preferences Select from the following options:

Fix Invalidly Nested and Unclosed Tags. Select to rewrite overlapping or transposed tags and inserts closing quotation marks and to insert closing brackets as needed.

Rename Form Items When Pasting. Select to prevent duplicate names for form objects.

Remove Extra Closing Tags. Select to delete closing tags that don’t have an associated opening tag.

Warn When Fixing Or Removing Tags. Select to display a summary of invalid HTML code Dreamweaver wants to fix.

Never Rewrite Code: In Files With Extensions. Select to prevent code rewriting in files with specific file extensions, and then specify the files extensions you want separated by a space.

Encode <, >, &, And “In Attribute Values Using &. Select to make sure attribute values you enter outside Code view contain legal characters.

Do Not Encode Special Characters. Select to prevent Dreamweaver from changing URLs to use only legal characters.

Encode Special Characters In URL Using &#. Select to make sure URLs you enter outside Code view contain legal characters (use the &# encoding method).

Encode Special Characters In URL Using %. Select to make sure URLs you enter outside Code view contain legal characters (use the % encoding method).

Encode Special Characters In URL Using %.

Encode Special Characters In URL Using %. Click OK.

Setting Code Color Preferences

Setting Code Color Preferences

DW 5.1

You can use the Code Coloring section of the Preferences dialog box to specify colors for general categories of tags and code elements, such as HTML Image or style tags, Library items, or CSS properties. For a selected tag or code element, you can specify the text color, background color, and any formatting (Bold, Italic, or Underline) you want to make it easier to work with your code.

Set Code Color Preferences

Set Code Color Preferences Click the Dreamweaver (Mac) or Edit (Win) menu, and then click Preferences.

Set Code Color Preferences Click the Code Coloring category.

Set Code Color Preferences

Set Code Color Preferences Click the Default Background color box, and then select a color.

Set Code Color Preferences Click the document type in which you want to set code colors.

Set Code Color Preferences Click Edit Coloring Scheme.

Set Code Color Preferences Select the style for the document type you want to change.

Set Code Color Preferences

Set Code Color Preferences Specify the text color, background color, and any formatting (Bold, Italic, or Underline) you want.

The sample code in the Preview pane displays the new styles and colors.

Set Code Color Preferences Click OK.

Set Code Color Preferences Click OK.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset