# HOW TO : How to add html code in servoy

**URL:** <https://forum.servoy.com/t/how-to-how-to-add-html-code-in-servoy/11249>\
**Category:** Classic Servoy\
**Created:** [October 7, 2009, 10:14am UTC](https://forum.servoy.com/t/how-to-how-to-add-html-code-in-servoy/11249 "2009-10-07T10:14:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![amchtwe](https://avatars.discourse-cdn.com/v4/letter/a/a5b964/32.png) [@amchtwe](https://forum.servoy.com/u/amchtwe)\
**Post date:** [October 7, 2009, 10:14am UTC](https://forum.servoy.com/t/how-to-how-to-add-html-code-in-servoy/11249/1 "2009-10-07T10:14:35Z")

</div>

Hi there,

I want to add some HTML code in my servoy project.

I tried to add HTML code in label object (named lblHTML) like

var html = “

| some text here |

”;

forms.testForm.lblHTML.Text = html;

but i guess it is not a good idea to add HTML sort like that.

Next, I tried HTML pane to add HTML code.

But actually I’ve no idea with HTML pane.

Could you pls show me how to do with HTML pane??

Thanks indeed

Aung Mon

---

<div class="post-metadata">

**Author:** ![mboegem](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/mboegem/32/4399_2.png) [@mboegem](https://forum.servoy.com/u/mboegem)\
**Post date:** [October 7, 2009, 10:20am UTC](https://forum.servoy.com/t/how-to-how-to-add-html-code-in-servoy/11249/2 "2009-10-07T10:20:14Z")

</div>

> amchtwe:  
> forms.testForm.lblHTML.Text = html;

This should actually be: ```  
forms.testForm.elements.lblHTML.text = html;

```auto

Hope this helps!
```

---

<div class="post-metadata">

**Author:** ![amchtwe](https://avatars.discourse-cdn.com/v4/letter/a/a5b964/32.png) [@amchtwe](https://forum.servoy.com/u/amchtwe)\
**Post date:** [October 7, 2009, 10:34am UTC](https://forum.servoy.com/t/how-to-how-to-add-html-code-in-servoy/11249/3 "2009-10-07T10:34:47Z")

</div>

Hi mboegem,

Thanks for your reply.

i tried like what you said “forms.testForm.elements.lblHTML.Text = html;”

but u know, label object is not very good to show html in the servoy, i guessed.

it can only show limited area and if my data in the html area is dynamically grow then it can’t show he entire html are.

I want to use some other object rather than HTML code inside label object.

---

<div class="post-metadata">

**Author:** ![mboegem](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/mboegem/32/4399_2.png) [@mboegem](https://forum.servoy.com/u/mboegem)\
**Post date:** [October 7, 2009, 10:56am UTC](https://forum.servoy.com/t/how-to-how-to-add-html-code-in-servoy/11249/4 "2009-10-07T10:56:29Z")

</div>

try a html-area when using global- or form variable.  
This should give a better result.

Generally: the standard display options of html within java are not of the most brilliant kind, so you’ll find some restriction on what is possible.
