3 min read

Source: Roblox Creator Hub · CC BY 4.0 · View source · Code samples: MIT Imported 2026-10-03. Formatting adapted for this site.

Rich text markup

UI rich text utilizes simple markup tags to style sections of a string in bold, italics, underline, fill color, stroke variations, and more. You can apply styling tags to TextLabel, TextButton, and TextBox objects.

Enable rich text

You must enable rich text on a per-object basis through its RichText property in the Properties window, or by setting the property to true in a LocalScript.

local title = Instance.new("TextLabel")
title.RichText = true

title.Text = "Use a <b>bold title</b>"

Note

When editing an object's Text property in Studio, toggling the RichText checkbox in the Properties window displays the text string as a final render. This is useful for identifying and correcting mistakes in any supported tags.

Note

Localizing a game to support other languages removes rich text formatting tags. To ensure formatting appears in other languages, re-apply the tags manually to your localized strings.

Supported tags

Rich text tags are similar to XML/HTML tags and you must include both an opening and closing tag around the formatted text.

<b>Formatted text</b>

You can also nest tags inside each other as long as you close them in the reverse order of how you opened them.

<b><i><u>Formatted text</u></i></b>

Font color

<font color=""> </font>

`I want the orange candy.`
`I want the orange candy.`

Font size

<font size=""> </font>

`This is big. This is small.`

Font face

<font face=""> </font>

`This is Michroma face.`

Note

Font face/family names are listed on the Font enum reference page.

Font family

<font family=""> </font>

`This is Michroma face.`

Note

Font face/family names are listed on the Font enum reference page.

Font weight

<font weight=""> </font>

`This is normal. This is heavy.`
`This is normal. This is heavy.`

Note

Font weight can be a case-insensitive string name including Thin, ExtraLight, Light, Regular, Medium, SemiBold, Bold, ExtraBold, or Heavy; it can also be a number in factors of 100 between 100 and 900.

Font transparency

<font transparency=""> </font>

`Text at 50% transparency.`

Stroke

<stroke> </stroke>

Parameter Equivalent Property Example Values
`color` [`UIStroke.Color`](/docs/uistroke#uistroke-color) `"rgb(255,125,0)"`, `"#FF7800"`
`thickness` or `th` [`UIStroke.Thickness`](/docs/uistroke#uistroke-thickness) `"1"`, `"4"`, `"0.5"`
`transparency` or `tr` [`UIStroke.Transparency`](/docs/uistroke#uistroke-transparency) `"0"`, `"0.5"`, `"1"`
`joins` [`UIStroke.LineJoinMode`](/docs/uistroke#uistroke-linejoinmode) `"round"`, `"bevel"`, `"miter"`
`sizing` [`UIStroke.StrokeSizingMode`](/docs/uistroke#uistroke-strokesizingmode) `"fixed"`, `"scaled"`
`You won 25 gems.`

Note

See UI appearance modifiers for details on <stroke> tag parameters such as thickness and joins.

Bold

<b> </b>

`Text in bold.`

Italic

<i> </i>

`Text italicized.`

Underline

<u> </u>

`Text underlined.`

Strikethrough

<s> </s>

`Text with strikethrough applied.`

Line break

<br/>

`New line occurs after this sentence.
Next sentence...`

Uppercase

<uppercase> </uppercase>
<uc> </uc>

`Uppercase makes words read loudly!`
`Uppercase makes words read loudly!`

Small caps

<smallcaps> </smallcaps>
<sc> </sc>

`My name is Diva Dragonslayer.`
`My name is Diva Dragonslayer.`

Mark

<mark> </mark>

`Text highlighted.`

Comment

<!-- -->

`After this is a comment... and now more text...`

Escape forms

If you want to render certain characters like < or > and exempt them from consideration as part of rich text tags, you can write them in their escape form.

Character Escape Example Result
`<` `<` `10 < 100` 10 < 100
`>` `>` `100 > 10` 100 > 10
`"` `"` `Meet "Diva Dragonslayer"` Meet "Diva Dragonslayer"
`'` `'` `Diva's pet is a falcon!` Diva's pet is a falcon!
`&` `&` `Render another escape form &lt; by escaping an ampersand` Render another escape form **&lt;** by escaping an ampersand