Message # 1 | 6:30 PM
Tutorial - Display image using HTML and BB codes

Before we start with the tutorial, I need to inform you that if you want to display an image, you need to upload image on the internet or you can use image sharing service like Tinypic. I used Tinypic for example because tinypic is easy to use. It's up to you to decide which image sharing service you will use.


Steps to upload:

Uploading image. To upload you need to click "Browse"
and select the file on your computer and click "Upload"

Once you uploaded image - it gives you 4 links. You need these links to make
image appear. If you don't know which link to use, look for one that begins with
"http://" and ends with an image extension, usually it is ".gif", ".jpg", or ".png".



Basic image appearance:

The code that is used to display an image...

Code
BB code:
[IMG]http://i35.tinypic.com/j0zj48.jpg[/IMG]

HTML code:
<img src="http://i35.tinypic.com/j0zj48.jpg">



Link to another page using an image:

The code that is used to create linkable image...

Code
BB code:
[url=http://www.ucoz.com][img]http://i35.tinypic.com/j0zj48.jpg[/img][/url]

HTML code:
<a href="http://www.ucoz.com"><img src="http://i35.tinypic.com/j0zj48.jpg"></a>
http://www.ucoz.com - Page link
http://i35.tinypic.com/j0zj48.jpg - Image link



Linkable image opening in a new tab/window:

You know how to create linkable image. Now to open the page in a new tab/window you
will need to add target="_blank" in the code. (Only needed in HTML, BBC is automatically)

Code
HTML code:
<a href="http://www.ucoz.com" target="_blank"><img src="http://i35.tinypic.com/j0zj48.jpg"></a>



Give border to your image:

If you want to add border to your image. You will need to add border="0" in the code.
Note: "0" gives you no border. You can change border values to 1, 2, 3, 4, 5, 6 so on.

Code
HTML code:
<img src="http://i35.tinypic.com/j0zj48.jpg" border="2">



Resize image using HTML:

You can change height and width of your image using width="xx" and height="xx".

Code
HTML code:
<img src="http://i35.tinypic.com/j0zj48.jpg" border="2" width="300px" height="400px">



What is the use of "alt"?

The "alt" tag is used to show text if the image cannot be displayed.

Code
HTML code:
<img src="http://i35.tinypic.com/j0zj48.jpg" border="2" width="300px" height="400px" alt="Show this text">

"I don't like to commit myself about heaven and hell - you see, I have friends in both places"