Ted Palmer
asked on
How do I compose a HTML link tag that links to an image file in a subdirectory of the current directory?
How do I compose a HTML link tag that links to an image file in a subdirectory of the current directory?
<img src="subdirectory/image.jp g" />
<a href="subdirectory/image.j pg">Link to image</a>
ASKER
Sorry guys. Since I am not an HTML guy, I don't know how to articulate my question very well. This image is actually a big enough picture to consume a whole web page. It should open in a separate browser tab or instance. I prefer tab. It is way to big to be imbedded in the middle of a paragraph of text. Could you modify your comment to make it open in a different browser page?
Thank you,
Ted
Thank you,
Ted
By default a browser will open a JPG, in it's own tab (all by itself).
<a href="subdirectory/image.j pg" target="_blank">Link to image</a
ASKER
tailoreddigital,
I pasted your tag into my HTML file. It causes a square nested inside of a square with an 'X' inside of it to appear in my web browser displayed HTML. When I click on it nothing happens.
I'll paste in a relevant snippent of my HTML
you have to have the Data Object Relationships diagram (<img src="0000_SubrogationDataR elationshi ps.tif"/> ) in front of you whenever you are trying
Thanks,
Ted Palmer
I pasted your tag into my HTML file. It causes a square nested inside of a square with an 'X' inside of it to appear in my web browser displayed HTML. When I click on it nothing happens.
I'll paste in a relevant snippent of my HTML
you have to have the Data Object Relationships diagram (<img src="0000_SubrogationDataR
Thanks,
Ted Palmer
ASKER
padas:
Are you sure this is right?
<a href="subdirectory/image.j pg" target="_blank">Link to image</a
The '</a' on the end looks like a syntax error.
Ted Palmer
Are you sure this is right?
<a href="subdirectory/image.j
The '</a' on the end looks like a syntax error.
Ted Palmer
It's a copy and paste error. Like paying the rent....you must close the tag. </a>
ASKER
So can I copy and paste your code into my HTML and modify it to display my image file and expect it to work?
Padas code should work. When i posted to you i was trying to show you how to use a sub folder, i assumed you knew how to load from the current folder. Padas code is the complete tag.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Padas,
I pasted your code into my HTML file. It looks like this:
you have to have the Data Object Relationships diagram (<a href="0000_SubrogationData Relationsh ips.tif" target="_blank">Subrogatio nDataRelat ionships</ a> ) in front of you whenever you
The web page displays the anchor text as "SubrogationDataRelationsh ips".
The path to the file is "C:\Drv3\Temp\Temp-9"
See attached file for the error-message.png file
I left out the subdirectory.
CanNotFind.png
I pasted your code into my HTML file. It looks like this:
you have to have the Data Object Relationships diagram (<a href="0000_SubrogationData
The web page displays the anchor text as "SubrogationDataRelationsh
The path to the file is "C:\Drv3\Temp\Temp-9"
See attached file for the error-message.png file
I left out the subdirectory.
CanNotFind.png
ASKER
Padas,
Ok! when I did like I asked you to show me to make it, it worked. It opened the image file in the program that is in the windows registry to use to open that kind of file. It work the way I asked how to make it work,
You got it. Thank you.
Ted Palmer
Ok! when I did like I asked you to show me to make it, it worked. It opened the image file in the program that is in the windows registry to use to open that kind of file. It work the way I asked how to make it work,
You got it. Thank you.
Ted Palmer
ASKER
Thank you. You do good work.
Ted Palmer
Ted Palmer
Firstly you have to add an alt attribute to the img as said by the W3c...
The correct format of the img tag is..
and your code would be somewhat like this...
The correct format of the img tag is..
<img src="path_of_image.image_format" alt="alternate_text">
and your code would be somewhat like this...
<a href="path_of_the_image">Click here to see the image</a>
Thanks! I'm glad it worked.
ASKER
I thought I was posting this comment in a different question sorry. So I extracted it out of here.
Ted Palmer
Ted Palmer