How to Host Unity Games on the Web
Objective: Learn to build our game for WebGL.
So now we want to build our game for WebGL. How can we do this ?
First, we need to make sure we are on the proper platform for the build.

Just a note, in case you don’t have the Switch Platform option, make sure to Install with Unity Hub first, so such option will appear.
Now Unity will recompile our game for WebGL, this may take a couple of minutes.
Now we just need to build. But wait, we can’t click on Build yet, as it seems that we have a incompatibility issue that needs to be resolved. In order to fix this, we have to change our Color Space back to Gamma for WebGL builds.

Now that this is resolved, we just have to build our game, create a folder for this new WebGL build, and we’re good to go.

And there you have it, now you have your build for WebGL.

You could upload this file and two folder to a web server so others could have access to your game!