In the most cases the htmlHTML is just the root for your webmap. You have various dependencies like css-files, js-files or geodata.
All the data is usually stored in different folders, named like css, js, data, etc. If you want to share a webmap running on localhost, you will have to share the other folders and files, too.
E.g. a leaflet map exported with qgis2web looks like following: