Reputation: 2146
I'm having difficulty in inserting html tags through CSS and for it to be interpreted as html.
I want to write <noscript><h2>Please enable javascript!</h2></noscript>
after the h1 header on all pages; so I have
h1:after
{
content: "\003cnoscript\003e\003ch2\003ePlease enable javascript! \003c/h2\003e\003c/noscript\003e";
}
in my CSS.
Whilst this successfully writes
<noscript><h2>Please enable javascript!</h2></noscript>
It is treated as a string literal and displays it on the page as part of the original h1 header.
For obvious reasons I cannot use javascript for this particular task :P
Upvotes: 0
Views: 143