AddOn Studio Wiki

XML UI ← XML elements < SimpleHTML

SimpleHTML is a Frame type that can display formatted HTML or plain text. SimpleHTML is used as an element of a XML/Frames array. See also UIOBJECT SimpleHTML.


Inherited by: none, Inherits: Frame, Runtime object: SimpleHTML
Defined in: Frames, Ui


  • <FontString> - a FontString that defines the font to be used for the SimpleHTML box text, use this or the font attribute. Required unless 'font' attribute is set.
  • <FontStringHeader1>
  • <FontStringHeader2>
  • <FontStringHeader3>


  • font (string) - A virtual Font, FontFamily or virtual FontString to use for font settings for the HTML or plain text. Basically a named font, like 'GameFontNormal'. Works like 'inherit' for the built in FontString element. Is not the same the FontString 'font' attribute, and setting to a font file path will not work.
  • file (string) - path and file name of text file to load that contains html to display. like: 'Interface\AddOns\MyAddon\html.txt'
  • hyperlinkFormat (string)
  • resizeToFitContents (boolean)
  • disallowFormatting (boolean)


  • OnHyperlinkEnter
  • OnHyperlinkLeave
  • OnHyperlinkClick


As of Ui 36949 90002

<xs:complexType name="SimpleHTMLType">
    <xs:extension base="ui:FrameType">
        <xs:element ref="FontString"/>
        <xs:sequence minOccurs="0">
          <xs:choice maxOccurs="unbounded">
            <xs:element name="FontStringHeader1" type="ui:FontStringType"/>
            <xs:element name="FontStringHeader2" type="ui:FontStringType"/>
            <xs:element name="FontStringHeader3" type="ui:FontStringType"/>
      <xs:attribute name="font" type="xs:string"/>
      <xs:attribute name="file" type="xs:string"/>
      <xs:attribute name="hyperlinkFormat" type="xs:string" default="|H%s|h%s|h"/>
      <xs:attribute name="resizeToFitContents" type="xs:boolean" default="false"/>
<xs:element name="SimpleHTML" type="ui:SimpleHTMLType" substitutionGroup="ui:Frame"/>


SimpleHTML is like an HTML formattable FontString, in the form of a Frame style Ui element.


<Frame name="MyFrame">
    <SimpleHTML name="$parentHTML">
      <Size x="200" y="200" />
        <Anchor point="TOP">
          <Offset x="0" y="-22" />
      <FontString inherits="GameFontNormal" justifyV="TOP" justifyH="LEFT" />
    </SimpleHTML >


Other Examples[]

Simple example using an existing font template that loads html form a file.

<SimpleHTML font="GameFontNormal" file="Interface\AddOns\WowAddon6\html.txt">
  <Size x="200" y="200" />
    <Anchor point="CENTER" />

From default UI, retail build version 36949, 90002, Blizzard_EncounterJournal.xml:

<SimpleHTML parentKey="Text" inherits="InlineHyperlinkFrameTemplate">
  <Size x="95" y="10"/>
    <Anchor point="TOPLEFT" relativeKey="$parent.Bullet" relativePoint="TOPRIGHT" x="4" y="0"/>
  <FontString inherits="GameFontBlack" justifyH="LEFT" justifyV="TOP">
    <Color r="0.25" g="0.1484375" b=".02" a="1"/>
    <OnHyperlinkEnter function="EncounterJournal_OnHyperlinkEnter"/>

From default UI, retail build version 36949, 90002, Blizzard_GuildInfo.xml:

<SimpleHTML name="GuildInfoMOTD" disallowFormatting="true">
    <AbsDimension x="284" y="42"/>
      SetItemRef(link, text, button, self);
  <FontString inherits="GameFontNormalSmall" justifyH="LEFT" justifyV="TOP" spacing="2">
    <Color r="1" g="1" b="1"/>