Unordered List

Wednesday, April 11, 2012

How to Convert an Image to HTML Code

                      

With just a few snippets of HTML code, you can embed an image into any web page, email or other Internet-based HTML or XML document. While you cannot "convert" an image to HTML code, you can save the image locally or at a specific Web address and then designate a place for it in an HTML document. You can also specify how many pixels large the the image should appear, both vertically and horizontally. Read on to learn how to convert an image to HTML code.

  • 1

    Choose an image. It can be any image of any size.

  • 2

    Save the image locally or online. This means that you can save it to your computer or at a specific Web address. If you want other people to be able to see the image online, you need to upload the image to a Web server. Use your website server, or if you have no website, try using Picasa or other image storage and sharing application. Take note of the URL where the photo is saved.

  • 3

             Open an HTML document. Use the image tag and the exact URL of where the image is stored: <img src="http://example.com/image.jpg">.

            This will embed    the image into your HTML document. When the user opens that document via a Web browser or other program, the image will appear.

  • 4

    Adjust the width of the image as you wish it to appear, in terms of pixels. Again, use the exact URL of where the image is stored. For example, <img src-"http://example.com/image.jpg" width=400>. This will stretch or shrink the existing width of the image to 400 pixels.

  • 5

    Adjust the height of the image as you wish it to appear, in terms of pixels. For example, <img src="http://example.com/image.jpg" height=700>. This will stretch or shrink the existing height of the image to 700 pixels.

  • 6

    Combine width and height adjustments as necessary. For example, <img src="http://example.com/image.jpg" width=400 height=700>.

  • 7

    Turn the image into a link if desired. Use the anchor tag with the image tag embedded within. For example, <a href="http://website.com"><img src="http://example.com/image.jpg" width=400 height=700></a>.

0 comments:

Post a Comment