user5405873 user5405873 - 1 month ago 7
Javascript Question

how to show the title always without hover in html

how to show the title always without hover in html.

here is a situation where i have multiple repeating grid and i want to identify with date.

so i want to show the title always? how can i achieve this please help me.

see details

<a href="#" title="created at 13 october">see details</a>

<a href="#" title="created at 14 october">see details</a>


here is a demo: https://jsfiddle.net/wub5y96d/1/

Answer

You can output the content of an element's attribute using content: attr(attribute); on either of the pseudo elements ::after or ::before, like this:

a[title]::after {
  content: ' ('attr(title)')';
}

Demo