Help With HTML SYNTAX please.

Soldato
Joined
3 Dec 2004
Posts
2,639
Hi all,

At the moment i use this code which displays a pic in a html table:

<IMG height=600 alt="Picture Name" src="*where pic url goes" width=400>

What I would like todo is when the picture is clicked the full sized pic is displayed by redirecting the viewer to the page the pic is hosted (therefore full sized pic)

Hope you understand what im talking about - im very bad with HTML.

Any help appriciated

Thanks guys,
 
Ice Rich said:
Hi all,

At the moment i use this code which displays a pic in a html table:

<IMG height=600 alt="Picture Name" src="*where pic url goes" width=400>

What I would like todo is when the picture is clicked the full sized pic is displayed by redirecting the viewer to the page the pic is hosted (therefore full sized pic)

Hope you understand what im talking about - im very bad with HTML.

Any help appriciated

Thanks guys,


Code:
<a href="http://www.bigpicture.html" target="_blank"><img src="small picture" alt="picture name" width="400" height="600" border="0" /></a>
 
Last edited:
Harib0 said:
Code:
<a href="http://www.bigpicture.html" target="_blank"><img src="small picture" alt="picture name" width="400" height="600" border="0" /></a>


Thanks for reply, so do i just put that syntax after the main pic code?
 
no you replace it with it

you need to wrap the <img src=.....> in an <a href=.....></a> tag

so you will end up with <a href="newpicture.jpg"><img src="url" height=600 width=400 alt="Picture Name"></a>
 
Abraham said:
no you replace it with it

you need to wrap the <img src=.....> in an <a href=.....></a> tag

so you will end up with <a href="newpicture.jpg"><img src="url" height=600 width=400 alt="Picture Name"></a>

Thanks, think im getting it now. So it should look like this.

<a href="URL Of where full size pic is hosted"><img src="normal sized URL" height=600 width=400 alt="Picture Name - do i really need this?"></a>
 
Ice Rich said:
Thanks, think im getting it now. So it should look like this.

<a href="URL Of where full size pic is hosted"><img src="normal sized URL" height=600 width=400 alt="Picture Name - do i really need this?"></a>
yep that's the job, no you dont need the alt there, it will work with out it
 
Depenfding if it's an important picture or not you can leave the alt tag out.

Though some say that having alt text is good for search engine optimization.

And the other thing is screen readers, can't see the picture but can read the alt text
 
If you're coding to XHTML standards (Which you should be), you need the 'alt' tag as it won't validate without it and it's only a few seconds extra work to put it in anyway :) Another way of doing this btw is with javascript and the

Code:
onClick=window.open

command which is better in some respects because you can customise the window size and remove the file bar etc which is sometimes useful :cool:
 
Trigger said:
If you're coding to XHTML standards (Which you should be), you need the 'alt' tag as it won't validate without it and it's only a few seconds extra work to put it in anyway :) Another way of doing this btw is with javascript and the

Code:
onClick=window.open

command which is better in some respects because you can customise the window size and remove the file bar etc which is sometimes useful :cool:


Thanks for replys,

But in order to use java do I and viewers of my site need a java script?
 
Ice Rich said:
Thanks for replys,

But in order to use java do I and viewers of my site need a java script?

well if they want to be able to run javascript which that code is then yes they'll need to have it turned on in the browser
 
Back
Top Bottom