“Hello world” in CSS?

Yes, you can! Thanks to this insightful article by Chris Coyier over at CSS-Tricks—athough this is more of an edge case. Here’s what he says:

CSS can’t do that! Um, well, unless you write body::after { content: "Hello, World!"; } in style.css file and open a web page that loads that CSS file. So CSS does execute, in its own special way. It’s a domain-specific language (DSL) rather than a general-purpose language (GPL). In that browser context, the way CSS is told to run (<link>, usually) isn’t even that different from how JavaScript is told to run (<script>, usually).

So, to sum up:

body::after {
    content: "Hello World!";
}

can produce something like this:

This is pretty obvious, but it just goes to show that… CSS can in fact print Hello World. Of course, CSS But the larger argument that Chris makes, is that, while CSS might not be the first candidate for Turing completeness, it does in fact contain some programming concepts inside.

CSS is a programming language! Here’s why

And, my own contribution: Aren’t !important and @supports both proof that CSS is a programming language, in its own, albeit special, way?

Chris asserts that the bigger picture is about pay. His concern: If CSS is not regarded as a true programming language, would CSS specialists get lower pay than their counterparts?

https://css-tricks.com/is-css-a-programming-language/