decorative banner

Adding HTML text to a slice


    Choosing the No Image type for a slice lets you enter text that will appear in the slice area of the resulting Web page. This text is HTML text--you can format it using standard HTML tags. You can also select vertical and horizontal alignment options. For more information on specific HTML tags, see an HTML reference (either printed or on the Web).

    Photoshop and ImageReady do not display HTML text in the document window; you must use a Web browser to preview the text. (See Previewing an image in a browser.) Keep in mind that the appearance of text is affected by the browser settings and operating system it is viewed on. Be sure to preview HTML text in different browsers, with different browser settings, and on different operating systems to see how text will appear on the Web.

    Note: Be careful not to enter more text than can be displayed in the slice area. If you enter too much text, it will extend into neighboring slices and affect the layout of your Web page.

To add HTML text to a slice:

  1. Select a slice. If you are working in Photoshop, double-click the slice with the slice select tool to display the Slice Options dialog box.
  2. In the Slice Options dialog box (Photoshop) or the Slice palette (ImageReady), select No Image from the Type pop-up menu.
  3. Type the desired text in the provided text box.
  4. (Photoshop Save for Web dialog box and ImageReady) If the text includes HTML formatting tags, select the Text is HTML option. When this option is deselected, all the text you enter (including formatting tags) will be displayed in the resulting Web page.
  5. (Photoshop Save for Web dialog box and ImageReady) If desired, select options in the Cell Alignment section of the dialog box.
  6. Horizontal alignment options:

    • Default to use the browser's default for horizontal alignment.
    • Left to align the text to the left side of the slice area.
    • Center to align the text to the center of the slice area.
    • Right to align the text to the right side of the slice area.

    Vertical alignment options:

    • Default to use the browser's default for vertical alignment.
    • Top to align the text to the top of the slice area.
    • Baseline to set a common baseline for the first line of text in cells in the same row (of the resulting HTML table). Each cell in the row must use the Baseline option.
    • Middle to center the text vertically in the slice area.
    • Bottom to align the text to the bottom of the slice area.