CSS - Attr function (attribute)

About

The attr function select the value of an attribute

Example

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

where:

Documentation / Reference





Discover More
Boxdim
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