Image Code Generator

Use the following HTML image code generator to embed an image into your website. In HTML, images are embedded using the <img> tag. The image code generator below automatically creates this tag, as well as the relevant CSS for any customization that you decide on.

Alt Text:
Border Color:
Border Width:
Border Style:
Link (optional)
Destination URL:
Link Target:

Image Location

(Replace the above URL with the URL of your image)

The Code

Here is the code that was generated:

Customizing The HTML

Once you've generated your HTML image code, if you need to make further changes, check out the <img> element. This is the element that is used in the above code.

Customizing The CSS

The CSS is the code between the <style></style> tags. These are the codes that determine styles of your image (such as the border, width, height, etc). You can change the CSS properties (or add new ones) as you like.

If you intend to use the same styles across many pages (a whole website, for example), you should move them to an external style sheet.


You may also be interested in these copy/paste HTML image codes and this Image Code Editor.

About was created in order to provide HTML tools, codes, tutorials, and other resources to help webmasters create and maintain their HTML documents. aims primarily at beginners, but may also be useful to web professionals.

About the HTML Codes

The HTML codes on this website are provided free of charge, for you to use however you wish. Feel free to modify the code to suit your own needs.

My Related Sites

Here are some of my other sites: