html_render.py

This is too much work for the append method.  You're mixing two separate concerns here.  The `append` method should be concerned only with adding new content items to the list of content items.  The `render` method should be concerned with rendering an item and its contents.  Here you are crossing those two purposes and as a result you have to work harder than you ought.