What is Nostr?
Terence Eden /
npub1x59…gect
2024-08-18 09:57:57

Terence Eden on Nostr: In today's adventures of finding out weird things you can do with HTML… You should ...

In today's adventures of finding out weird things you can do with HTML…

You should not put a `<style>` element anywhere other than the `<head>`

So `<body><style> ...CSS...</style></body>` is an error. (It works, because browsers are tolerant.)

But you *can* put a `<link rel="stylesheet">` element in a body.

Obviously, that needs an *external* data source for the CSS.

So you can cheat by Base64 encoding it!

`<body><link rel="stylesheet" type="text/css" href="data:text/css;base64,LyoqCi…">`
Author Public Key
npub1x595mggkh492xtl25nfk5j4xnd2yuscfgmp2n7s6csanxsn99vlq5egect