The attr()
function in CSS allows
us to use HTML attribute values as
CSS property values.
Let's look at an example:
In the above example, we are using
the data attribute data-caption
within the attr()
function.
When we hover over the paragraph,
its content is dynamically displayed.