Create unordered list in render array I'm attempting to create an unordered list using a render array in a custom block in a custom module.

I understand if I wanted to wrap things in div I could always use the 'container' type. Like so

    $content = [
        'container'    =&gt; [
            '#type'       =&gt; 'container',
            '#attributes' =&gt; [
                'class'      =&gt; ['container'],
            ],
            'item 1'      =&gt; [
                '#type'       =&gt; 'html_tag',
                '#tag'        =&gt; 'p',
                '#value'      =&gt; 'Item 1',
            ],
            'item 2'      =&gt; [
                '#type'       =&gt; 'html_tag',
                '#tag'        =&gt; 'p',
                '#value'      =&gt; 'Item 2',
            ],
        ],
    ];


But I'd like to be able to use an unordered list like so

    $content = [
        'container'    =&gt; [
            '#type'       =&gt; 'html_tag',
            '#attributes' =&gt; [
                'class'      =&gt; ['container'],
            ],
            '#tag' =&gt; 'ul',
            'item 1'      =&gt; [
                '#type'       =&gt; 'html_tag',
                '#tag'        =&gt; 'li',
                '#value'      =&gt; 'Item 1',
            ],
            'item 2'      =&gt; [
                '#type'       =&gt; 'html_tag',
                '#tag'        =&gt; 'li',
                '#value'      =&gt; 'Item 2',
            ],
        ],
    ];


What I'd like that to produce is

&lt;ul class="container"&gt;
  &lt;li&gt;Item 1&lt;/li&gt;
  &lt;li&gt;Item 2&lt;/li&gt;
&lt;/ul&gt;


But instead it produces

&lt;ul class="container"&gt;&lt;/ul&gt;
&lt;li&gt;Item 1&lt;/li&gt;
&lt;li&gt;Item 2&lt;/li&gt;   


Is there a way to create an unordered list using render arrays?
Use the theme 'item_list':

$content = [
  '#theme' =&gt; 'item_list',
  '#list_type' =&gt; 'ul',
  '#title' =&gt; 'My List',
  '#items' =&gt; ['item 1', 'item 2'],
  '#attributes' =&gt; ['class' =&gt; 'mylist'],
  '#wrapper_attributes' =&gt; ['class' =&gt; 'container'],
];          


The wrapper_attributes are not used in all themes. In core this is classy and bartik, which is based on classy.