Showing posts with label Link. Show all posts
Showing posts with label Link. Show all posts

Friday, September 18, 2009

How to create a link on Image: Clickable image?



If you click on the image shown above, it will open a new google page for you.
In this post, we will discuss that how to create a link on image.
Whenever you upload a picture into Blogspot post, BlogSpot automatically stores it to its server and creates a link for it. In my case, the link is:-


I got this information from Edit HTML of editor. If you go to Edit HTML, code will appear very similar to:-
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiprdHAMqjIyQ29OrBIGyCD8t9t3LPwXOTngMCiLe4qZr_nRlZ3PHkslIdMOBi2hr7IeUiByL3xF4bs7sR_rIrgP6ShACC1oxymXkCMfqUfb2ksd-JUxieAh2DaVBvi2tKPXZsPdZ1whlr/s320/google.bmp" imageanchor="1" style="clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;">
<img border="0" iq="true" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiprdHAMqjIyQ29OrBIGyCD8t9t3LPwXOTngMCiLe4qZr_nRlZ3PHkslIdMOBi2hr7IeUiByL3xF4bs7sR_rIrgP6ShACC1oxymXkCMfqUfb2ksd-JUxieAh2DaVBvi2tKPXZsPdZ1whlr/s320/google.bmp" />
</a>
</div>

 
You can see a line as src=https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiprdHAMqjIyQ29OrBIGyCD8t9t3LPwXOTngMCiLe4qZr_nRlZ3PHkslIdMOBi2hr7IeUiByL3xF4bs7sR_rIrgP6ShACC1oxymXkCMfqUfb2ksd-JUxieAh2DaVBvi2tKPXZsPdZ1whlr/s320/google.bmp.
It says that image displayed in the blog will be from this source.
 
Then one more line:- 
<a href=https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiprdHAMqjIyQ29OrBIGyCD8t9t3LPwXOTngMCiLe4qZr_nRlZ3PHkslIdMOBi2hr7IeUiByL3xF4bs7sR_rIrgP6ShACC1oxymXkCMfqUfb2ksd-JUxieAh2DaVBvi2tKPXZsPdZ1whlr/s320/google.bmp

It says that when Image will be clicked, open document , https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiprdHAMqjIyQ29OrBIGyCD8t9t3LPwXOTngMCiLe4qZr_nRlZ3PHkslIdMOBi2hr7IeUiByL3xF4bs7sR_rIrgP6ShACC1oxymXkCMfqUfb2ksd-JUxieAh2DaVBvi2tKPXZsPdZ1whlr/s320/google.bmp
which is the same source image.
 
Now we want to modify this code, so that when we click on the link, it should open the google page.
Thus we need to modify it as <a href=http://google.com

If we want to open this link in a new browser, we need to use target="_blank" attribute for it. Also, we will add alt attribute, which will help to display a text message in case image line is not available in the server.

Thus, modified code will appear as:-

<div class="separator" style="clear: both; text-align: center;">
<a href="http://www.google.com" imageanchor="1" style="clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;" target="_blank" alt="Google Search" >
<img border="0" iq="true" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiprdHAMqjIyQ29OrBIGyCD8t9t3LPwXOTngMCiLe4qZr_nRlZ3PHkslIdMOBi2hr7IeUiByL3xF4bs7sR_rIrgP6ShACC1oxymXkCMfqUfb2ksd-JUxieAh2DaVBvi2tKPXZsPdZ1whlr/s320/google.bmp" />
</a>
</div>

More information about basics of creation of a link, Click Here.

I hope this post was not complicated. ;-)

Keep Blogging.

BlueOcean

How to create a link?


In this post, we will discuss about how to create a clickable link.
Technically, we use html tag <a>, known as anchor tag to create a link. It can be used to
(1) create a link to another document, by using the href attribute
(2) create a bookmark inside a document, by using the name attribute.
 
Here, we will discuss about creation of link to another document in Blogspot. Some examples of link:-
(a) Click me to open google in a new window
(b) Click me to open google in the same window. After clicking me, you can use Back button in your browser to come back to this page.

Create a link
Step1:- Highlight the text, where you want to create the link


Step2:- Click on Link icon of text editor

Step3:- A window will appear. If you want to create link for website, enter the url. Else, enter emailid for email link.

Step4:- Save the window. And publish the post. Link will work now.
Step5:- If you click on the link, Google will be opened in the same window (like example (b)). If you want it to open in a new window, go to Edit HTML editor.
There, you will find anchor tag as <a href="http://www.google.com/">Click me</a>
Modify it to <a href="http://www.google.com/" target="_blank">Click me</a>

After this modification, Click me link will open the link document in a new browser!


 

Popular Posts

Popular Posts On EAB

Demo Donation
This demonstration will accept a fixed amount of $0.05.

Man Behind This Blog

My Blogs