Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

before content from attribute

/* html */
<p data-foo="Lorem Ipsum"></p>

/* css */
[data-foo]::before {
  content: attr(data-foo);
}
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #content #attribute
ADD COMMENT
Topic
Name
6+1 =