Adding Line Breaks


Just as in a word processor, you press Enter (Return) in Dreamweaver to create a new paragraph. This is fine when you want to actually create a new paragraph, but not so great when you just want to move the cursor down a line, as you might want to do when entering an address. That's because Web browsers (and Dreamweaver) insert a blank line above and below a paragraph, so if you make each line of the address its own paragraph, it looks goofy ( Figure 4.23 ).

Figure 4.23. Paragraphs have whitespace before and after them, which isn't really appropriate for things like addresses.


What you want to do is add a line break , which moves the cursor down one line without creating a new paragraph. In the code, Dreamweaver adds the HTML <br /> tag to the end of the line.

To insert a line break:

  • At the end of the line you want to break, press Shift-Enter (Shift-Return).

    or

    At the end of line you want to break, in the Text category of the Insert Bar, select Line Break from the Characters pop-up menu.

    The text changes ( Figure 4.24 ).

    Figure 4.24. After you replace the paragraph tags with line breaks, the address looks better.

Tip

  • Line breaks are invisible characters in both Dreamweaver and Web browsers, but you can make them visible in Dreamweaver if you want. Choose Edit > Preferences (Dreamweaver > Preferences), then click the Invisible Elements category. Click the check box next to "Line breaks," then click OK. Dreamweaver then displays line breaks in the Design view ( Figure 4.25 ).

    Figure 4.25. With the appropriate preference enabled, you can see the invisible line break characters.





Macromedia Dreamweaver 8 for Windows & Macintosh Visual QuickStart Guide
Macromedia Dreamweaver 8 for Windows & Macintosh
ISBN: 0321350278
EAN: 2147483647
Year: 2005
Pages: 239

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net