CSS - Attr function (attribute)


The attr function select the value of an attribute


<p data-length="2m" >Beyond The Sea</li>
p::before {
   content: attr(data-length) " ";


Documentation / Reference

Discover More
CSS - Content (Property)

The content CSS property is used with: the ::before and ::after pseudo-elements to generate content respectively: before or after the content of an element. Visually, the content is located at...
HTML - Data attributes

Data (Key value) can be included for processing by a script using the data-=“” attributes. css attribute function Output: With an attribute selector, you can select the nodes with a certain...

Share this page:
Follow us:
Task Runner