"Hello, World!" in CSS

How to do "Hello, World!" in CSS.

/* hello-world.css */
html::before {
    content: 'Hello, World!'

This is a very unorthodox use of CSS. Combined with an empty valid HTML document, this will produce an output in any browser. I made a pen for you.

For more "Hello, World!" examples, go to the Hello World category.

Posted by Anders Tornblad on Category Hello World Labels
Tweet this