Click here to Skip to main content
14,733,515 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to add a title on a specific html symbol like:

✯ i want to point over it and see "star" as a tooltip or title.

What I have tried:

i used <dfn title="star"> ✯ </dfn> but it makes it italic.
Updated 6-Jun-18 11:29am

1 solution

That's just the browser's default styling for the <dfn> tag.

You can either override the default styling, or use a tag with no default style, like <span>.

Dfn with inline style:
Span: <span title="star"></span>
Dfn with inline style: <dfn title="star" style="font-style:normal;"></dfn>
Member 13861771 6-Jun-18 17:53pm
Thank you. I forget span element and good to know that styling.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900