# HtmlPanel

The `HtmlPanel` control can be used to embed full HTML documents within a Wisej.NET application.

{% hint style="info" %}
For a full list of properties, methods and events see the [API documentation.](http://docs.wisej.com/api)
{% endhint %}

## Features

### Custom HTML

Any HTML file or code can be directly linked to the `HtmlPanel` control using the `Html` or `HtmlSource` property.

```csharp
//For the Html property, put the entire HTML code as a string
htmlPanel1.Html = "<b>Example Text Here</b>";

//For the HtmlSource property, provide a string contining the path to a HTML file
htmlPanel1.HtmlSource = "MyHtmlFile.html";
```

Clicks inside the `HtmlPanel` can be handled with the `ElementClick` event.

{% hint style="danger" %}
It's not recommended to use HTML containing an iframe within the `HtmlPanel`. The `HtmlPanel` cannot handle clicks on anything inside the iframe. If your HTML contains an iframe, use the [IFramePanel](/docs/controls/content/iframepanel.md) instead.
{% endhint %}

![HtmlPanel displaying embedded HTML content](/files/-MjQTqoiCwN1KcjNJJu-)

## Advanced

### JavaScript Widget

| Item             | Description                                                                                                         |
| ---------------- | ------------------------------------------------------------------------------------------------------------------- |
| Class name       | "wisej.web.ScrollableHtmlPanel"                                                                                     |
| Theme appearance | "widget", see [Themes](https://docs.wisej.com/theme-builder/theme-elements/elements).                               |
| Child components | "pane" is the container for the HTML content. See [JavaScript](/docs/concepts/javascript-object-model.md).          |
| Source Code      | [https://github.com/iceteagroup/wisej-js](https://github.com/iceteagroup/wisej-js/blob/master/wisej.web.TextBox.js) |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wisej.com/docs/controls/content/htmlpanel.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
