You can see which of Blender's video codecs support alpha transparency here:
Supported Video & Audio Formats — Blender Manual
In short, we have VP9, FFV1, Quicktime (PNG or Qt Animation). We also have HuffYUV not mentioned on this page, but it's meant for recording data more than lighweight broadcast like web.
To my knowledge, the safest video encoding settings for transparency for the web would be WebM/VP9 video codec in a WebM container. As it is the main standard for the web, it's even made for it to begin with.
But as of today, Blender's current VP9 implementation doesn't support Alpha.
In addition, it seems that web browser officially do not support FFV1, and I haven't seen any mention of either HuffYUV nor QuickTime's PNG codecs in Web video codec guide - Web media technologies | MDN and couldn't manage to make it work myself. But QuickTime's Qt Animation seems to work. So you can try that. Don't forget to also chose RGBA colors:

You also need to make sure you enabled transparency in your render settings:

That being said, WebM VP9 remains the current standard (well, except for Safari browsers, that'd be QuickTime still). A way around Blender's faulty vp9 could be to render your animation into an image sequence, like TGA or DPX (I avoid PNG because of how long it takes to read/write files), then use ffmpeg to convert it into vp9 with transparency.
For that procedure, see:
ffmpeg - Convert PNGs to webm video with transparency - Stack Overflow
With these options, unless you covered your environments with opaque things in the 3D world or in compositing, you should have a video with transparency.
Now when it comes to how to use that on a website, compatibility issues with different hosts, frameworks, web browsers, .... These are problematics not suited for Blender Stack Exchange.