# HTML in labels

**URL:** <https://forum.inductiveautomation.com/t/html-in-labels/2577>\
**Category:** Ignition\
**Created:** [January 28, 2011, 7:18pm UTC](https://forum.inductiveautomation.com/t/html-in-labels/2577 "2011-01-28T19:18:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![scicco](https://avatars.discourse-cdn.com/v4/letter/s/e0b2c6/32.png) [@scicco](https://forum.inductiveautomation.com/u/scicco)\
**Post date:** [January 28, 2011, 7:18pm UTC](https://forum.inductiveautomation.com/t/html-in-labels/2577/1 "2011-01-28T19:18:28Z")

</div>

Hello,

I have an HTML table as the text in one of my labels with the layout relative and the font scaled. Ideally, I would like my HTML table to take up the entire width of the label control but when I use “…\<table width=100%…”, it only takes up a small portion in the middle of the label. If I don’t use a percentage, I can get the table to resize but text ends up being cut off when users resize the window. Perhaps I’m not sure on how it interprets HTML but I was hoping someone could lend a pointer or two.

Thanks in advance,  
Steve

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [January 28, 2011, 11:25pm UTC](https://forum.inductiveautomation.com/t/html-in-labels/2577/2 "2011-01-28T23:25:03Z")

</div>

The HTML of a label doesn’t know what the width and height of the label are. You have to tell it what the width is, for example:[code]

| Column 1 | Column 2 |

 [/code]You can get the width of the component in scripting but in order to use it you have to set the text of the label in a script. Not very easy. Let us know if you have more questions.
