Design View, HTML Editor

   

Design view in the HTML editor enables you to:

Note In Design view, the editor displays only the body of a document ù the portion following the HTML <BODY> tag. To edit information in the <HEAD> block, use Source view or the elements' property pages.

In Design view, Web pages are formatted and displayed the way they would be in Microsoft Internet Explorer 4.0, even if you normally use a different browser.

Switching to Design View

Use the tabs at the bottom of the editor window to switch to Design view. When you switch an existing document to Design view or open an .htm file in Design view, the editor might make the following small adjustments to your document to represent the page visually or to preserve formatting:

Certain conditions can prevent the editor from switching successfully to Design view. If the editor detects any of the following conditions, it displays a message indicating that it cannot make the switch:

Editing in Design View

You can edit in Design view in much the same way that you do in a word processing program. In general, to format elements, you select text and use the HTML toolbar, Design toolbar, or menu commands to apply formats. You can add elements, such as HTML controls, applets, paragraph and line breaks, and horizontal lines, by dragging them from the ToolBox onto the page. You can change a selected element's appearance by setting values in the Properties window.

Tip To move quickly to any element in the page, click it in the HTML Outline window.

Formatting that you apply in Design view is preserved as closely as possible when you switch to other views. For example, if you add spaces between two words, the spaces are preserved as non-breaking spaces in the HTML document.

Objects such as buttons and HTML intrinsic controls, tables, lines, marquees, tables, images, Java applets, and controls display a selection border when you select them. You can edit their appearance using the Properties window.

Note If a file referenced in your document changes while the document is open ù such as a style sheet, Java applet, or image ù the HTML editor does not automatically update your view of the document. To get the most current versions of elements referenced in your document, choose Refresh from the View menu.

If an element contains text, such as a button with a caption, a table, a marquee, a text box, or a text area, you can directly edit the text while in Design view.

To edit control text

To help you edit more easily, you can set the following options in the Options dialog box or on the Design toolbar:

Glyph Represents
HTML comment
Client script block (<SCRIPT>) or Server script block in.asp page (<% %> or <SCRIPT RUNAT="Server">)
Style block (<STYLE>)
<NOFRAMES> tag, used to specify alternate content for browsers that do not support frames.
Anchor point for absolutely positioned elements or elements that are aligned in the center or right. The glyph appears where the HTML tag defining the element is located in the HTML document.
Unrecognized HTML tags

Adding Script

You can quickly create or edit script.

To edit script in Design view

When you edit script, the editor switches to Source view, opens the Script Outline window. In the Script Outline window, the focus is placed on the default handler for the element you selected. You can then double-click the name of the event to create a new handler for it, or navigate in the Script Outline window to an existing script.

Visual Differences in Design View

A document displayed in Design view differs from one displayed in a browser in these ways: