# Merge HTML Learn how to merge HTML files, combine HTML files into one file programmatically in Python via .NET language using GroupDocs.Merger for Python via .NET library. GroupDocs.Merger for Python via .NET allows you to combine multiple HTML files into a single document programmatically. All content — text, images, tables, embedded styles, and other markup — is preserved in the merged output. HTML (HyperText Markup Language) is the standard language for web pages displayed in browsers. HTML 5, the latest version, offers broad flexibility for structuring and presenting content. HTML files can be served from a web server or loaded from the local file system. ## Steps to merge HTML files 1. Create an instance of the `Merger` class and pass the path to the first (base) HTML file. 2. Call `merger.join()` with the path to each additional HTML file to append. 3. Call `merger.save()` with the desired output path to write the merged file. {{< tabs "merge-html-example" >}} {{< tab "merge_html_documents.py" >}} ```python from groupdocs.merger import Merger def merge_html_documents(): # Load the first HTML file as the merge base with Merger("./input.html") as merger: # Append the second HTML file merger.join("./input2.html") # Save the combined HTML file merger.save("./output.html") if __name__ == "__main__": merge_html_documents() ``` {{< /tab >}} {{< tab "input.html" >}} {{< tab-text >}} `input.html` is a sample file used in this example. Click [here](https://docs.groupdocs.com/merger/python-net/_sample_files/developer-guide/merge/html/input.html) to download it. {{< /tab-text >}} {{< /tab >}} {{< tab "input2.html" >}} {{< tab-text >}} `input2.html` is a sample file used in this example. Click [here](https://docs.groupdocs.com/merger/python-net/_sample_files/developer-guide/merge/html/input2.html) to download it. {{< /tab-text >}} {{< /tab >}} {{< tab "output.html" >}} ```text

Text inside a bookmark 1

}}) - [Merge PDF files]({{< ref "merger/python-net/developer-guide/merge/pdf.md" >}}) - [More use-cases and complete Python via .NET sources]({{< ref "merger/python-net/showcases.md" >}})