data-type
<string> — CSS reference
A CSS string is quoted with matching single or double quotes. Escape sequences can represent quotes and other characters. An unescaped line break is not allowed inside an ordinary quoted string. Strings are not interchangeable with identifiers in every grammar.
Formal Syntax & Structure
css syntaxcss
<string> /* e.g. "Ready" or 'Ready' */Working Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>CSS reference lab</title><style>#a::before {content:"Status: ready"} #b::before {content:"A \"quote\""}</style><body><div id="parent"><div id="a">Sample</div><div id="b">Comparison</div></div></body></html>