Link to home
Start Free TrialLog in
Avatar of cbeverly
cbeverly

asked on

html title attribute

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# >      
ASKER CERTIFIED SOLUTION
Avatar of bartvd
bartvd
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
"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.