# Edit HTML in C#

> Edit HTML in C# using Aspose.Slides for .NET.

Source: https://products.aspose.com/slides/net/editor/html/
Updated: 2026-07-09



## Edit HTML Using Aspose.Slides

[Aspose.Slides for .NET](/slides/net/) can load HTML into a presentation, update slide content, and save the result back to HTML.

## Edit HTML in C#

Using [Aspose.Slides for .NET](/slides/net/), you can update text imported from an HTML document with a few lines of C# code.

### C# code for editing HTML

```cs
using var presentation = new Presentation();
presentation.Slides.RemoveAt(0);
presentation.Slides.AddFromHtml("page.html");

var slide = presentation.Slides[0];

if (slide.Shapes[0] is IAutoShape shape && shape.TextFrame is not null)
{
    shape.TextFrame.Text = "New text";
}

presentation.Save("page.html", SaveFormat.Html);
```

## How to Edit HTML

Create a `Presentation` object.

Load HTML content with `AddFromHtml`.

Access the target slide and shape through variables.

Update the text through `TextFrame` and save with `SaveFormat.Html`.

## Edit other files
