You are here:

HTML/More Techniques

Advertisement


Question
Sorry I have another question! I've decided to do this code:
<marquee direction="right" onmouseover="this.stop();" onClick="link">
 <img src=" http://www.goodlightscraps.com/content/teddy-bear/teddy-bear-7.jpg" />   
</marquee>

I have been trying to incorporate a link so when its clicked on it'll go to another page. I thought I could put a link inside the "onClick" where the word "link" is but I can't find it!

Answer
Dear Becky,

You can easily accomplish this by having an "Anchor Tag", which we called links in web environment. Simply what you need to do is surround the image with a link. So once somebody click on the image it will go to your desired page.

Let's assume , you want to go to google.com , when someone clicks on the image. This is how you do this.

<marquee direction="right" onmouseover="this.stop();" onClick="link">
   <a ##### href="http://www.google.co.uk" ####>
       <img src=" http://www.goodlightscraps.com/content/teddy-bear/teddy-bear-7.jpg" />
   </a>
</marquee>

**** Please remove hashes (####) from the code. I had to put hashes, because this editor automatically converts the code into an image.

Simply put the link of your destination page inside href.

Remember to place the closing tag "</a>", after the image. Otherwise user will be able to click anywhere on the page to go to another page.  

Regards,
Anjana

HTML

All Answers


Answers by Expert:


Ask Experts

Volunteer


Anjana Silva

Expertise

I can answer most of HTML related questions. Also I can combine HTML with CSS, JavaScript, AJAX, PHP, etc.. Also if you need to combine these technologies with an IDE like Dreamweaver, it's my pleasure!

Experience

I'm in HTML field (Web Development & Design) for more than 7 years. I've developed lots of web sites using HTML/CSS/PHP/MySQL.

Organizations
1) e-Innoving IT Solutions - Owner/Developer
2) OpenArc Business Process Outsourcing - PHP Web Developer
3) Stan Bond (SA) PTY LTD - Web Application Developer


Publications

Few sites that I have done using Dreamweaver.

1) http://www.legendmaldives.com
2) http://e-innoving.com/index.php/portfolio
3) http://www.vacationmaldives.com
4) http://www.stanbondsa.com.au
5) http://www.adelaidequalityblinds.com.au/
6) http://www.sybilwettasinghe.com
7) http://www.novels.lk


Education/Credentials
1) Currently following MSc in Software Engineering in De Montfort University, Leicester
2) Bachelor in Information Technology (UCSC)
3) Sun Certified Java Professional (SCJP)
4) Diploma in Advanced Web Techniques using Dreamweaver.


Awards and Honors
2nd Class Upper Award for my Bachelors Degree with an average GPA of 3.48

©2016 About.com. All rights reserved.