HTML text control in PowerApps

A box that shows text and converts HTML tags to formatting.

Description

An HTML text control not only shows plain text and numbers but also converts HTML tags, such as non-breaking spaces.

Key properties

Color – The color of text in a control.

Font – The name of the family of fonts in which text appears.

HtmlText – Text that appears in an HTML text control and that may contain HTML tags.

Additional properties

BorderColor – The color of a control's border.

BorderStyle – Whether a control's border is Solid, Dashed, Dotted, or None.

BorderThickness – The thickness of a control's border.

DisplayMode – Whether the control allows user input (Edit), only displays data (View), or is disabled (Disabled).

DisabledBorderColor – The color of a control's border if the control's DisplayMode property is set to Disabled.

DisabledFill – The background color of a control if its DisplayMode property is set to Disabled.

Fill – The background color of a control.

Height – The distance between a control's top and bottom edges.

HoverBorderColor – The color of a control's border when the user keeps the mouse pointer on that control.

OnSelect – How the app responds when the user taps or clicks a control.

PaddingBottom – The distance between text in a control and the bottom edge of that control.

PaddingLeft – The distance between text in a control and the left edge of that control.

PaddingRight – The distance between text in a control and the right edge of that control.

PaddingTop – The distance between text in a control and the top edge of that control.

Size – The font size of the text that appears on a control.

Tooltip – Explanatory text that appears when the user hovers over a control.

Visible – Whether a control appears or is hidden.

Width – The distance between a control's left and right edges.

X – The distance between the left edge of a control and the left edge of its parent container (screen if no parent container).

Y – The distance between the top edge of a control and the top edge of the parent container (screen if no parent container).

Find( FindString, WithinString )

Example

  1. Add a Label control, name it Source, and set its Text property to this string:

<p> We have done an unusually &nbsp; &quot; deep &quot; globalization and localization. <p>

Don't know how to add, name, and configure a control?

  1. Add an HTML text control, and set its HtmlText property to this value:
    Source.Text

    The HTML text control shows the same text as the Label control but converts the tags to the appropriate characters.

Accessibility guidelines

HTML text is not meant to be interactive. It should only be used for text display.

Color contrast

There must be adequate color contrast between:

  • Color and Fill
  • Text with custom colors and its background

Screen reader support

  • HtmlText must be present.

Keyboard support

  • HtmlText should not contain interactive elements like <button>, <a>, or <input>. The TabIndex system in PowerApps does not consider elements inside HtmlText.