We help IT Professionals succeed at work.

html title attribute

cbeverly
cbeverly asked
on
Can you have html tags embedded in the html title attribute?
I am pulling a field from a database (HardCoverRetailPrice) and displaying it in the title attribute, but the field has <strike> in it and when I mouseover, the title attribute displays this:

<strike>$55.00</strike>
$41.25 hardcover

I would like the strikethrough mark to display instead of <strike>

<a href="/visit/stores/online_redo/index_shop_ault.cfm" class="nounderline"><img src="/visit/images/#CoverImageFilename#"  title="HardcoverRetailPrice# >      
Comment
Watch Question

Commented:
This is not possible using the title attribute. You would have to create a tooltip youself with javascript to do this.
HainKurtSr. System Analyst
CERTIFIED EXPERT
Commented:
"Can you have html tags embedded in the html title attribute?"

Google commonly embeds javascript in the headers of pages, and the results are wildly unpredictable.  It seems to be a way to "hack" the browsers to not screen javascript for errors.  Title will not work, but you might experiment with putting code into the HEAD.  But by definition, no HTML in the head is executed.  SO I would say no, the browsers are simply going to ignore the tags, and probably the entire <TITLE> data.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.