Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Web Design & Development > Adobe Dreamweaver

  • Print
  • + Share This
  • 💬 Discuss

Indenting and Aligning Text with HTML

You won’t indent or align text in Dreamweaver as you would with a word processor. The most common kind of indenting, indenting the first line in a paragraph, is usually done with a tab in a word processor, but tabs have no effect in HTML. Instead, you can use the text-indent CSS style property. Similarly, there are CSS properties for text alignment. See Chapter 7 for more about using CSS.

You can add whitespace to text—and simulate a tab—with non-breaking spaces. See “Inserting Special Characters,” later in this chapter.

When you are indenting paragraphs to set them apart from preceding and following paragraphs, Dreamweaver uses the HTML <blockquote> tag. This indents both the left and right margins of the block-quoted paragraph. You aren’t limited to paragraphs; you can block quote any block element, such as headings.

Dreamweaver can align text with the left margin, right margin, or center of the page. You can also justify text, which adds space as needed between words so that both the left and right margins are aligned.

The method shown here adds alignment attributes to the HTML markup. You can also use Cascading Style Sheets to align text, which is covered in Chapters 7 and 8.

To block quote text

  1. Click in the paragraph or other block element you want to indent.
  2. Click the Indent button on the HTML mode of the Property inspector red-a.jpg.

    04fig20.jpg

    red-a.jpg Use the Indent button to apply a block quote to your text.

    or

    Choose Format > Indent, or press Ctrl-Alt-] (Cmd-Opt-]).

    The text changes red-b.jpg.

    04fig21.jpg

    click here to view image

    red-b.jpg The block quote nicely sets off the sonnet from the commentary text.

To remove block quoting

  1. Click in the paragraph or other block element you no longer want to indent.
  2. Click the Outdent button on the Property inspector.

    or

    Choose Format > Outdent, or press Ctrl-Alt-[ (Cmd-Opt-[).

    The text changes.

To align text

  1. Click inside the paragraph you want to align.
  2. Choose Format > Align, and then choose Left, Center, Right, or Justify from the submenu red-c.jpg.

    04fig22.jpg

    click here to view image

    red-c.jpg Choose a text alignment from the Format menu.

    or

    Use one of the keyboard shortcuts listed in Table 4.2.

Table 4.2. Alignment Shortcut Keys

Shortcut Key (Windows)

Shortcut Key (Mac)

What It Does

Ctrl-Alt-Shift-L

Cmd-Opt-Shift-L

Left alignment

Ctrl-Alt-Shift-C

Cmd-Opt-Shift-C

Center alignment

Ctrl-Alt-Shift-R

Cmd-Opt-Shift-R

Right alignment

Ctrl-Alt-Shift-J

Cmd-Opt-Shift-J

Full justification

  • + Share This
  • 🔖 Save To Your Account

Discussions

comments powered by Disqus