Additional Reading: Using WebGL Templates
File -> Build Settings
Select WebGL as the platform
Open Player Settings for WebGL -> Resolution and Presentation
Select the lol-template WebGL template
Ensure that the Run in Background checkbox is NOT checked (see Concept->Pause + Resume for more info)
If using Unity 2018
Open Player Settings for WebGL > Publishing Settings > Linker Target
Ensure that Linker Target is set to Both. This will produce a WebAssembly build in addition to the fallback asm.js format for browsers that do not support WebAssembly. (see the Unity User Manual for more information).
Note that Unity 2019 no longer supports the asm.js fallback, so there is no longer an option to set the Linker Target.