Last updated July 15, 2019

Strings of simple HTML and plain text can be defined in a render array using the #markup and #plain_text element types. In this tutorial we'll look at:

  • Adding simple strings to a render array so they appear as HTML on the page
  • When to use #markup and #plain_text in your code

By the end of this tutorial, you should be able to add simple strings of HTML and plain text to a render array.