Nested TITLE attributes Oct07 '05

When both parent and child elements contain a title attribute, the child element wins. I don’t know why this is the case, but it seems to be consistent.

For example, quite often an image is also a link. So, the HTML would look something like this:

<a title="Title for this link"><img title="Title for this image" /></a>

When the mouse pointer hovers over this image (contained within a link), the "tooltip" will contain "Title for this image."

I’m not sure if the inner-most child element always wins, or just in this case.

In any case, it got me thinking about XML, and the redundancies that similar attributes cause.

Also, as far as accessibility, does it matter where the title attribute goes?

Categories: Accessibility , Markup , XHTML , XML

Add Feedback (view all)

Leave feedback

Feedback

Input format: The editor controls below will assist with Markdown syntax.

Status

Sub-status

Your info

matthom is published and produced by Matt Thommes - an independent publishing enthusiast, mobile blogger, content creator, informative writer, web developer from Chicago. Never one to conform, Matt intends to promote the effect the web has on our lives, in an effort to intensify, instruct, and clarify all that is happening around us.

Contact Matt

Similar Entries

Stats

1 unique visit since August 2008

Recent Referrers (click)

Syndicate

Advertisements