Link pictures titles

  • Thread starter Luigi Donatello Asero
  • Start date
L

Luigi Donatello Asero

Does linking pictures titles to some word/words on the same page or on
another page in the same website comply with the specification
requirements for HTML 4.01 strict?
 
D

David Dorward

Luigi said:
Does linking pictures titles to some word/words on the same page or on
another page in the same website comply with the specification
requirements for HTML 4.01 strict?

You cannot place anchor elements (which are used to create links)
inside title elements or any attribute value (including title
attributes).

Attempts to do so are not valid and do not work, AFAIK, in any browser
at all.
 
A

Andy Dingley

Luigi said:
Does linking pictures titles to some word/words on the same page or on
another page in the same website comply with the specification
requirements for HTML 4.01 strict?

This is impossible to answer without knowing what a "picture title" is,
or what "linking" means.

You could certainly do this:

<div class="image" >
<img src="..." alt="Norwegian beaver cheese, stacked in the traditional
rounds" title="Norwegian beaver cheese" >
<p class="caption" ><a href="#norwegian_beaver" >Norwegian beaver</a>
<a href="#cheese" cheese</a></p>
</div>

<p id="norwegian_beaver" >A mythical dairy beast of the fjords</p>

<p id="cheese" >Stuff squirted out of a cow, then left to go solid</p>



As to whether it's "valid", then you can determine that easily by
looking at the DTD. Obviously trying to embed a <a> link inside an alt
attribute is crazy, but then anything is possible on your site.

Why am I even responding? I _know_ this can't be worthwhile. 8-(
 
L

Luigi Donatello Asero

David Dorward said:
You cannot place anchor elements (which are used to create links)
inside title elements or any attribute value (including title
attributes).

Attempts to do so are not valid and do not work, AFAIK, in any browser
at all.

Thank you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,169
Latest member
ArturoOlne
Top