Web Hosting Geeks | Web Hosting Experts
Need help? Call us 1(866)TOP-HOST

14625 reviews 1734 hosting providers

Questions & Answers

How to Convert an Image to HTML Code

Apr 18, 2012 by Maria
Hi all,

Can anyone please help me out. I need to convert ab image file to HTML code. How can I do that and what would I need?

thank you

1 Answer

0 votes
Apr 18, 2012 by RalphK
1.Choose an image.
2.Save the image locally or online.
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 pixels.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>.