What is the best way to create an alert bar with css but without javascript on the top of the page, like the one StackOverflow has for saying “Stack Overflow works best with JavaScript enabled”?
I’ve heard this is bad for SEO as it’s duplicate content on every page. How do I prevent that?
something like this:
This will add the notification at the top of the page, but will remove it if you have JavaScript enabled.
I’m not sure how you can force search engines to dismiss the text inside it. But if you have links, then you can use nofollow to stop the search engine from following the link, like so: