HTML
  Home arrow HTML arrow Page 3 - HTML Working with Images
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Moblin 
JMSL Numerical Library 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
HTML

HTML Working with Images
By: James Payne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2008-02-22

    Table of Contents:
  • HTML Working with Images
  • Alternatives to Images
  • Setting an Image as the Background
  • Setting Your Image as a Hyperlink

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    HTML Working with Images - Setting an Image as the Background


    (Page 3 of 4 )

    Aside from setting your background to a specific color, you can also set it as a particular image. You will need to keep in mind, however, how the background image will fit in with the rest of your site, in regards to color and theme. Also, if the image is smaller than your web page, it will be tiled and repeated across the page, which may or may not be your intention. Although this should be blatantly obvious, if you background is dark blue and your text is blue, users may have trouble reading the text.

    Since this article is really more of a how-to rather than a what-to, we'll stick with how to insert the image and let you worry about the aesthetics:


    <html>

    <body background="somebackground.jpg">

    </body>

    </html>

    Floating Images

    You can set how an image floats next to a paragraph using the align attribute once more. Only this time we do it in conjunction with our paragraph:


    <html>

    <body>

    <p>

    <img src ="sample.gif"

    align ="left" width="50" height="50">

    It was a dark and stormy night. A fat man stood in the rain eating a burrito and adding to his already incredible mass...

    </p>

    <p>

    <img src ="sample.gif"

    align ="right" width="50" height="50">

    A skinny man sat in the rain, watching a fat man eating a burrito and adding to his already incredible mass. He thought to himself: "What a fat ass."

    </p>

    </body>

    </html>

    By assigning the align attribute a left or right value, it dictates which side the image will appear on (left or right...duh).

    More HTML Articles
    More By James Payne


       · Thanks for dropping by. In thia article we discuss working with images in HTML. Some...
     

    HTML ARTICLES

    - Completing Construction of a Database Form w...
    - Maximizing and Restoring Images in a Tabular...
    - Building the Recordset for an HTML Database ...
    - Laying Out a Database Form with HTML
    - Tabular Database Form Functions with HTML
    - Tabular Database Forms with HTML
    - Using the Find Functions for HTML Database F...
    - Sorting for Database Forms with HTML
    - Edit and Other Database Form Functions with ...
    - More Database Form Functions with HTML
    - Database Form Functions with HTML
    - Using the HTML Table Element as a Recordset
    - Building Single Row Database Forms with HTML
    - Introduction to Database Forms with HTML
    - Another Look at Animation of Geographical Ma...






    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
    Stay green...Green IT