Also, each time you upload a photo, the script for the photo (in EDIT HTML mode) or the photo itself (in the COMPOSE mode) will be right at the top of the post, irrespective of where you place the mouse cursor. I prefer EDIT HTML mode rather than the COMPOSE as it gives me better control over how my post will display. Also, my habit is to leave the original script in its original place place at the top of the post, highlight it all, right-click, select "copy", scroll down the post editor window, paste it where I actually want the image. This means I will have 2 copies, the original at the top, and the copy at the spot where it will be eventually. This I feel is safer as if anything happened, you can still get the script from the original at the top, and only delete it when you have everything worked out fine.
For more details, refer to Uploading and manipulating images with Google Blogger (click BACK button to get back to this page).
Add caption direct into the Blogger script for the image>This is the easiest method. When you upload an image via the photo upload icon in the Blogger post editor, this is how the script may look like:
This is what appear at the end of the script:
Now what I am going to do is to cut out the beginning part of the above to make it shorter, then insert the text "CAPTION" into the script just before the last </a>:
This CAPTION can be any test you want and will do a demonstration below:
Note that I have chosen to upload the photo above as "center" as I only use option like "left" when it is a small photo and I want the text in the paragraph to wrap around the text. Note that while the photo in centered, the caption, is not, and also CAPTION is a link to the larger image on the web containing nothing else but the photo. I suspect this can be overcome by choosing the "left" option when uploading the image, but anticipate problems, unless you do not have any text in the same paragraph as the image. I do not know as I have never done it before, and don't have any need to do it. Leave a comment if you have experience with this and share.
The above does not look nice, so to center the caption, all I need to do is to add the HTML tag <span style="text-align;"> at the beginning of the script and <span style="text-align:center;"> and </span> at the end.
Note also that the above is not my photo, but is the property of David who have kindly given permission to use his photo in a post in another blog: Paris, most popular tourist destination in the world, etc. Note that it is also polite to attribute the source of the photo you use when it is not yours, and normally I acknowledge it by adding a link to whatever website the photo owner wants it. This is done by adding a HTML hyperlink tag <a> and I will put the script I used to display the photo by David at Paris, most popular tourist destination in the world, etc. The script is inside the scroll box below, and it is your job to study it if you want to do something similar, and ask for help if you get into any difficulties.
This is not obvious, but there are actually 2 links in the caption, one to the enlarged photo on the web (the one above), and one to the source of the photo (the one below). You can try clicking on them if you want and observe what happen. This is done by typing the text "Photo of Eiffel Tower and double Decker red bus", then pressing the ENTER key to force a line break, then continue with the HTML hyperlink tag to link to the source of the photo (<a href=".....).
I have earlier done it a very slightly different way as you can see in the photos in the post Malaysian students in Paris. Note that except for the first photo, all the captions in all the photos is a single line, not in 2 different lines like above. There are again 2 links in a single line in the caption, one is at the beginning and one at the end. It is not obvious, but since the photo owner, didn't object, I will just leave it as a demonstration. To make the 2 links in separate lines, you must make a line break by pressing the ENTER key when typing out the caption. You can study the script for the above example to better understand. Hopefully, this is very clear as to what can be done.
Advantages and disadvantages of inserting stuff direct into image script to add captionThe advantage of this method is, it is relatively easy to implement as compared to what follows, which require a bit more of HTML. The disadvantage is that the caption will always be a link, and you cannot have plain text or add a title which is possible in the second method.
As to having the photo aligned to the left, I have never tried adding captions to such images, but anticipate problems, so don't want to try. But if you have done it before, and willing to share your experience, I hope you will leave a comment with a link to the post where you have done it.
Use HTML tags for tableAnother way to add caption using the HTML table tag <table>. You can see an example of that in the post Malaysian married couple's honeymoon in Greece. In the first method, you cannot avoid captions as links. In this case, you can see the caption are plain text, not link. The way to do it is to upload your image via the photo upload icon in the Blogger post editor, select the "center" option, then upload. In the script for the image at the top of the post, add some descriptive text in the alt="" attribute in between the 2 quotation marks "" (highly recommended), highlight all the script, right-click, choose "copy" (or press ctrl+C), scroll down to where you want the image to be, right-click and choose "paste" (or press ctrl+V). This method will be a bit more complicated if you are not familiar with HTML, but let us press ahead and if you concentrate, you can do it and learn more HTML in the process. Note: it is important you do not press the ENTER key at any point while typing the HTML for the table or you will find large empty space above your photo. If you have difficulties in doing this, refer to Easy way to avoid large blank space above table when using the <table> HTML tag (click BACK button to get back to this page).
Type this at the beginning of the image script:
I will explain what all the gibberish is all about so you know what we are doing. <table is to tell the web browser we want to display a table. style="text-align:center;"> is to tell web browser we want things to be centered. <tr> is to indicate the beginning of a table row. <td> stand for table data. In this case, the table data is the script to display the image. Practically all HTML tags occurs in pairs, opening tags like those above, and closing tags. Now we need to add the closing tag at the end of the image script. At the end of the image script, type
</td> closes the table data tag, </tr> closes the table row tag, <tr> tells the web browser we are beginning a new table row and <td> tells the web browser we are starting a new table data, in this case, the caption. Just type the caption you want, then end it with
</td></tr></table>, the corresponding closing tags. For your better understanding, I will put the script to display one of the photos in the post Malaysian married couple's honeymoon in Greece below:
Instead of just plain text, you can also include link, for example, link to the source of the photo you took from, or to the website the photo owner wants to be linked to. For an example, have a look at Kuala Lumpur Terry Fox run. Look at the second photo in the post, the one of the National Museum of Malaysia. It has both a title and a caption, and within the caption, there is a link to the source of the photo (actually, by now, I have my own photo which I can use, but didn't at that time). Note that the photo was used with permission of the owner.
To have both title, photo, caption, you must have a 3 rows table. This is a long post, and I am a bit tired by now and have other things to do, so just going to put the script to display the photo of the National Museum of Malaysia below in a scroll box for you to examine, analyse and learn:
Acknowledgement: I got the idea of using <table> from Chuck or Nitecrutz of The real Blogger status but am now putting it in hopefully easily digestible form. I am going to add some HTML you can just copy-paste and then just edit to get what you want:
(later, got to finish something first)
You can also add a border to the table if you want. Just add an extra attribute border="1" to the HTML tag for table. If you want a thicker border, just increase the number from more than 1, the bigger the number, the thicker the border. I did this for one post, and found out that it caused problems. The table with the photo extend into the right sidebar, and in Internet Explorer 6, the right sidebar was pushed to the bottom of the post. I can't remember if I corrected the problem or left it as it is, but if I find it later, I will post a link. In the meantime, I need to finish this post and move on to other things.
Advantages of using table to add title and caption to photoAdvantages of using table is you can add both title and caption, the the capti0n can be just plain text or if you wish, a combination of text and link. Advantage is, it is slightly more complicated if you are not familiar with HTML and involves more work.
Update 30 January 2008: I have started using a different method and waiting for time to publish instructions. If interested, bookmark blog or subscribe in the email subscription box in the left sidebar.