# Convert HTML to PPT in Python

> Convert HTML content to PPT in Python. Use the Aspose.Slides Python API to import HTML and save the generated slides as a PowerPoint presentation.

Source: https://products.aspose.com/slides/python-net/conversion/html-to-ppt/
Updated: 2026-07-23



## Convert HTML to PPT using Aspose.Slides

[*Aspose.Slides for Python via .NET*](/slides/python-net/) lets you import supported HTML content into editable PowerPoint slides. Use `SlideCollection.add_from_html` to create slides from an HTML document, then call `Presentation.save` with `SaveFormat.PPT` to write the result in the legacy binary PowerPoint format.

The generated presentation can contain text, images, and basic formatting imported from the HTML source. This workflow does not require Microsoft PowerPoint or another presentation application.

## Convert HTML to PPT in Python

Create a `Presentation`, remove its default blank slide, import the HTML file, and save the generated slides as a PPT presentation.

### Python code for converting HTML to PPT

```python
with slides.Presentation() as presentation:
    presentation.slides.remove_at(0)

    with open("page.html", "rb") as html_stream:
        presentation.slides.add_from_html(html_stream)

    presentation.save("output.ppt", slides.export.SaveFormat.PPT)
```

## How to convert HTML to PPT in Python

These are the steps to convert HTML to PPT in Python.

Install [*Aspose.Slides for Python via .NET*](/slides/python-net/).

Import the `aspose.slides` package in your Python module.

Create a `Presentation` and remove its default blank slide.

Open the source HTML file and pass its stream to `SlideCollection.add_from_html`.

Call `Presentation.save` with the output file path and `SaveFormat.PPT`.

## Other Supported PowerPoint Conversions

- [JPG TO PPT](/slides/python-net/conversion/jpg-to-ppt/)
- [JPG TO PPTX](/slides/python-net/conversion/jpg-to-pptx/)
- [PNG TO PPT](/slides/python-net/conversion/png-to-ppt/)
- [PNG TO PPTX](/slides/python-net/conversion/png-to-pptx/)
- [PDF TO PPT](/slides/python-net/conversion/pdf-to-ppt/)
- [PDF TO PPTX](/slides/python-net/conversion/pdf-to-pptx/)
- [HTML TO PPTX](/slides/python-net/conversion/html-to-pptx/)
