Change content of data-title attribute using CSS?

Hi there,

I am wondering if it’s possible to change the content of a title attribute using CSS?

This is my code:

<span class="label-text" data-toggle="tooltip" data-placement="top" title="">

I’m wanting to add content to the title using CSS. Is this possible?

As far as I know the only way to add content with CSS is using pseudo ::before and ::after with the content property.

But that only applies to HTML elements, not attributes such as title.

2 Likes

Thanks. I think I will attempt to do it with jQuery.