HTML Course

 

Page 8 : Images III

  • Examples Of Image Alignment With Text
  • Here are some Web Page examples of images use inconjunction with text. To see these pages click on the examples in the left column below. You will also see on these example pages the exact html code use in construction of that page being viewed.

    Use your back button to return here.

    Alignment Examples
    Description

    An image aligned left with some text aligned
    to the right

    An image aligned right with some text aligned
    to the left

    Two images One aligned left the other right with text in the center

    One image aligned left with text and HSPACE
    to the left

  • Single Spacing Between Images
  • Sometimes you may want just a little horizontal spacing between two or more images. This is achieved by using the tag &ampnbsp; Each one of those tags is equal to a single hit on the spacebar. To see how this is used in a document Click Here
  • Images As Backgrounds
  • In addition to using colors as backgrounds, you can also add images as background. The background attribute is used within the <BODY> line of code. It will cover your Web Page background with an image. For our example we will use this image. Upload this to your files: stars.gif

    Then change your <BODY> line of code to this:

    <BODY BACKGROUND="stars.gif" BGCOLOR="#000000"
    TEXT="#00FF00" LINK="yellow" VLINK="orange" ALINK="red">

    Lets Add This Background Image To Our Existing HTML Document.Please note other slight changes in the coding.

    <HTML>
    <HEAD>
    <TITLE>Welcome To Aruba</TITLE>
    </HEAD>
    <BODY BACKGROUND="stars.gif" BGCOLOR="#000000"
    TEXT="#00FF00" LINK="yellow" VLINK="orange" ALINK="red">
    <H1 ALIGN="CENTER">
    <i><u>Welcome To Aruba</u></i></H1>
    <P>
    <HR SIZE=4 WIDTH="80%" ALIGN=CENTER>
    <HR SIZE=4 WIDTH="60%" ALIGN=CENTER>
    <HR SIZE=4 WIDTH="40%" ALIGN=CENTER>
    <P>
    <IMG SRC="aruba.jpg" BORDER=5 HEIGHT="150"
    WIDTH="200" ALIGN="right" ALT="sunset">
    <FONT SIZE="2" COLOR="white">
    <b><tt>This Beautiful Sunset In Aruba.<BR>
    Aruba is a lovely island off the<BR>
    coast of South America.<BR>
    The weather is perfect<BR>
    in Aruba any day of the year.</tt></b>
    </FONT>
    </BODY>
    </HTML>

    Click Here To See Our HTML Document So Far
    Use Your Back Button To Return Here