Html

Len

Town Elder
Tackler
Can someone tell me the difference between the two codes below:
They are both links to an image for a website page. I am using sample2 on my site, which one is the better? They are the same apart from things like; self,alt,blank.
I copied the code from this website in sample2


sample1
<a href="http://homepage.ntlworld.com/*****/" target="_blank"><img
alt="****derra Memories" border="0"
src="http://homepage.ntlworld.com/***/ur...derrabanner.jpg"
width="723" height="91"></a>

sample2
<a href=http://homepage.ntlworld.com/***target="_self""><img src="http://homepage.ntlworld.com/****/u...derrabanner.jpg"
alt="Return to Website" border="0"
width="723" height="91" /></a>



The links don't work. I made them so.​
samples only.​
 
Last edited:
Have always used the syntax in the 2nd example, but would use target="_blank" to open in a new window.
 
Thanks for that cazzer.

Ok.I dont want to open a new window. I want the link to put a banner on the top of a page. At the moment it does do, its just that I found the other sample"1" and wasn't sure which would do the job best.

href= my homepage. What is href?

target= "_self"?

img src= banners address i.e where the banner is kept.

alt= "Return to Website" what does this mean? Does this return the link after it has been to the banners address.

I didnt get the sample of this site, it was another. My mistake​
 
Last edited:
<a href" ***">~~~~</a> an anchor, just gives your link.

Target="_self" opens link in same window.

If youre linking to a site with a banner, would still use target="_blank" to open in a new window, always easier to get back home.

<img src="****"> just your image name

"alt" is the text you should see in a little box when you put your mouse over an image, it's hepful when pics don't show for some reason.

Check this link out, some useful info on there.

http://www.w3schools.com/html/default.asp
 
Thanks cazzer you have been a big help!

I am also sure that the link will help others too.
 
alt tags are also used by text to speech browsers used by visually disabled users. To check your site for DDA complience there is a tool called Bobby that will give you a report of things that will cause problems.
 
Back
Top