# Setting the HTML Content

## Content



The [C1RichTextBox.Html](/componentone/api/wpf/online-richtextbox/dotnet-api/C1.WPF.RichTextBox/C1.WPF.RichTextBox.C1RichTextBox.Html.html) property determines the HTML markup content of the [C1RichTextBox](/componentone/api/wpf/online-richtextbox/dotnet-api/C1.WPF.RichTextBox/C1.WPF.RichTextBox.C1RichTextBox.html) control. By default the **C1RichTextBox** control starts blank and without content but you can customize this at design time, in XAML, and in code. Note that you can also set text as the control's content. See [Setting the Text Content](/componentone/docs/wpf/online-richtextbox/C1RichTextBox_Task-Based_Help/Setting_the_Text_Content) for details.

**At Design Time**

To set the **C1RichTextBox.Html** property, complete the following steps:

1.  Click the **C1RichTextBox** control once to select it.
2.  Navigate to the Properties window, and enter text, for example "&lt;h1&gt;Hello World!&lt;/h1&gt;", in the text box next to the **C1RichTextBox.Html** property.

This will set the **C1RichTextBox.Html** property to the value you chose.

**In XAML**

For example, to set the **C1RichTextBox.Html** property addHtml="Hello World!" to the <c1rtb:C1RichTextBox> tag so that it appears similar to the following:

<c1rtb:C1RichTextBox HorizontalAlignment="Left" Margin="10,10,0,0" Name="C1RichTextBox1" VerticalAlignment="Top" c1:C1NagScreen.Nag="True" Height="83" Width="208" Html="&lt;h1&gt;Hello World!&lt;/h1&gt;" />

**In Code**

For example, to set the **C1RichTextBox.Html** property add the following code to your project:

```vbnet
Me.C1RichTextBox1.Html = "&lt;h1&gt;Hello World!&lt;/h1&gt;"
```

```csharp
this.c1RichTextBox1.Html = "&lt;h1&gt;Hello World!&lt;/h1&gt;";
```

**What You've Accomplished**

You've set the text content of the **C1RichTextBox** control. Note that you had to represent angle brackets (< >) as "&lt;" and "&gt;". Run your application and observe that initially "Hello World!" (or the text you chose) will appear in the control in large text:

![](https://cdn.mescius.io/document-site-files/images/f14c4281-7088-4b33-9b40-4a5f7acf258d/setting_the_html_content_files/image001.png)

Note that you can also set text as the control's content. See [Setting the Text Content](/componentone/docs/wpf/online-richtextbox/C1RichTextBox_Task-Based_Help/Setting_the_Text_Content) for details. For an example of adding a hyperlink to the content of the **C1RichTextBox** control, see the [Hyperlinks](/componentone/docs/wpf/online-richtextbox/Working_with_RichTextBox_for_WPF/Hyperlinks) topic.