<h2 title="Site Owner">Mr. Mark </h2>
Is it possible to edit/style the HTML title
(works like a tool-tip) attribute as illustrated above with CSS?
I tried styling it with inline css but it's not coming through.
CodePudding user response:
Yes, you will need a [title]:hover::after
rule as below:
h2[title]:hover::after {
content: attr(title);
position: absolute;
color: red;
top: 200;
left: 200;
}
<h2 title="Site Owner">Mr. Mark </h2>
CodePudding user response:
<span title="file 1"> Files</span>
a[title]:hover::after {content: attr(title);position: absolute;top: -100%;left:0;}