Setting Up a Document > Selecting elements in the Document window |
Selecting elements in the Document window
To select an element in the Design view of the Document window, you generally click the element. If an element is invisible, you must make it visible before you can select it.
To select elements, use these techniques:
To select a visible element in the Document window, click the element or drag across the element. | |
To select an invisible element, choose View > Visual Aids > Invisible Elements (if that menu item isn't already selected) and then click the element's marker in the Document window. | |
Some objects appear on the page in a place other than where their code is inserted. For example, a layer can be anywhere on the page, but the code defining the layer is in a fixed location. When invisible elements are showing, Dreamweaver displays markers in the Document window to show the location of the code for such elements. Selecting a marker selects the entire element; for example, selecting the marker for a layer selects the entire layer. (See About invisible elements.) | |
To select a complete tag (including its contents, if any), click a tag in the tag selector at the bottom left of the Document window. (The tag selector appears only when the Design view is active.) The tag selector always shows the tags that contain the current selection or insertion point. The leftmost tag is the outermost tag containing the current selection or insertion point. The next tag is contained in that outermost tag, and so on; the rightmost tag is the innermost one that contains the current selection or insertion point.
|
|
For example, when you define a link for an image, the HTML code looks something like this: | |
<a href="http://www.macromedia.com"><img src="agraphic.gif"></a> |
|
Clicking the image in the Document window changes the tag selector to show the tags for the selection: | |
<body><a><img> |
|
Because the image is selected, the <img> tag in the tag selector appears in boldface. Clicking that tag in the tag selector corresponds to selecting <img src="agraphic.gif"> in a code editor. |
|
To select the link (the a tag and everything inside it) instead of the image, click the image in the Document window and then click <a> in the tag selector. |
To see the HTML code associated with the selected text or object, do one of the following:
To display the Code view in the Document window, choose View > Code or View > Code and Design. For more information about the Code view, see Using the Code view (or Code inspector). | |
To open the Code inspector (in a separate window), choose Window > Code Inspector. |
When you select something in either code editor (the Code view or the Code inspector), it's generally also selected in the Document window. You may need to synchronize the two views before the selection appears; see Using the Code view (or Code inspector).