1. Install the HTML Exporter extension from the Atlassian Marketplace.
2. The Add-On provides an "Export to HTML" button on every Confluence page in the "more Actions" (...) menu.
3. Clicking the button will open a dialog where you can select all the child pages you want to export.
4. To export a whole space, navigate to the root page of the space and click the "Export to HTML" button.