9.4 Inserting text and graphics

A simple home page will be created to demonstrate how to enter and format text and images.

Skills practised
  • Entering text
  • Formatting text
  • Using a CSS style
  • Inserting an image
  • Page background
  • Horizontal rules
  1. P0906.png
    Open the home.html page and set the view at the top of the screen to DESIGN or LIVE.
  2. Press <Enter> or <Return> to leave a blank line and enter the text shown at the right, pressing <Enter> or <Return> after each line.
  3. You can spell check the text.

Formatting the text

Each paragraph can be formatted individually, but it is much more efficient to create a series of styles, called CSS styles, which will be recorded in the styles.css file.

  1. Highlight the first line of text and, in the Properties panel, turn on the CSS button and set the FONT to GOTHAM, the FONT-WEIGHT to BOLDER, the SIZE to 36 px, the COLOUR to YELLOW and the ALIGNMENT to CENTRE.
  2. Display the TOOLS menu, highlight CSS and select CONVERT INLINE CSS TO RULE.
    TS0907.png
  3. Call the style Heading and use the BROWSE button to set the STYLE SHEET box to your styles.css file, then select OK.
    TS0908.png
  4. Highlight the next line of text and, in the Properties panel, turn on the CSS button and set the FONT to CAMBRIA, the FONT-WEIGHT to BOLD, the SIZE to 18 px, the COLOUR to PALE BLUE and the ALIGNMENT to CENTRE.
  5. Display the TOOLS menu, highlight CSS and select CONVERT INLINE CSS TO RULE.
  6. Call the style: Body_Text and check that the STYLE SHEET box is set to your styles.css file, then select OK.
    TS0909.png
  7. TS0910.png
    Highlight the last three lines of text and set the TARGETED RULE box in the Properties panel to the BODY_TEXT style.

Adding a background colour to the page

A background colour can be applied to the page.

  1. In the Properties panel, click on the PAGE PROPERTIES button.
  2. Click on the BACKGROUND COLOUR box, select a DARK BLUE or DARK TEAL and press <Enter> or <Return>.
  3. Select OK to return to the page.

Inserting an image

An image will be added below the text.

  1. Click on the blank line after the last text then display the INSERT menu and select IMAGE.
  2. Open the Ticket image downloaded from the link above.
  3. When asked to copy the file to your site’s ROOT FOLDER, select YES.
  4. TS0911.png
    Create a NEW FOLDER called Images. Open the folder and select SAVE to store the image in that folder.
  5. You can use the bottom right handle of the image to adjust its size. Holding down the SHIFT key will maintain the proportions of the image.
  6. The BODY_TEXT style can be used to centre the image. Click to the right of the image and set the TARGETED RULE box in the Properties panel to BODY_TEXT.

Adding a line to separate the heading

A horizontal line can be added to the page to separate the heading from the text.

  1. Click at the beginning of the second line of text.
  2. Open the INSERT tab in the PANEL GROUP at the right of the screen and, in the HTML section, scroll down and click on the HORIZONTAL RULE option.
    Note: The Properties panel can be used to format the line.
    TS0912.png
  3. Select SAVE ALL from the FILE menu to save both the Home and Styles pages.
  4. You can click on the REAL-TIME REVIEW icon in the STATUS BAR at the base of the page and select a browser to see how the page will looks.
Video 9.2 Inserting text and graphics (04:00)