Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

css use value of attribute

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

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