I am reading this theming article http://themery.com/dgd7/advanced-theming/render/manipulate and I have a question.
This article has the following code:
$page['highlighted']['new_stuff'] = array(
'#type' => 'container',
'#attributes' => array('class' => 'my-container'),
);
$page['highlighted']['new_stuff']['heading'] = array(
'#type' => 'html_tag',
'#tag' => 'h2',
'#value' => t('Heading'),
'#attributes' => array('id' => 'my-heading'),
);
$page['highlighted']['new_stuff']['list'] = array(
'#theme' => 'item_list',
'#items' => array(
'First item',
'Second item',
'Third item',
),
);
I see that when you provide the #theme property you are telling the Render API to use the theme_item_list, and you pass it the #items variable. But isn't that exactly what you are doing when you set type to #html_tag, you're using the theme_html_tag and passing it variables?