File Quarantine on OSX:
> https://support.apple.com/en-us/HT201940
Alternate data stream on Windows:
> https://www.howtogeek.com/70012/what-causes-the-file-downloa...
I wouldn't be surprised if Linux had it but I haven't used desktop Linux in a long time so I don't know what to search for, but generally having browsers annotate their file streams isn't an uncommon thing to support for filesystems & browsers.
https://textslashplain.com/2016/04/04/downloads-and-the-mark...
Windows File System is very advanced and has metadata streams.
Files can have metadata, and most modern filesystems provide some kind of file attribute facility. On macOS browsers do exactly what described, setting a file attribute on downloaded files. The user will then be warned when trying to execute the file.
How would you "mark something 'from web'"? This is a file after all.
There are ways to sign files (executable or not) but there is no 'from web' flag as far as I know.