How to add an image using html

image html code

If you have ever wanted to add an image to your website using html then here is the code you need to use. This is something that I often want to know how to do when I am adding an image to my sidebar because widgets use html code.

So I thought I would put it here for my own use as well as others.

HTML Code To Add An Image Only

<img src=”url” alt=”some_text”>

The url is the link to the image itself

The alt attribute is for you to put some relevant keyword that describes your image (this is for the search engines benefit)

HTML Code To Add A Clickable Image

<a href=”website_url”><img src=”url” alt=”some_text”></a>

The website_url is a link to the website that you want visitors to be directed to when they click on your image.

Leave a Reply

Your email address will not be published.