I'm trying to create a table in standard HTML. But i have a lot of words to be wrapped in div tags. Normally I would do this server side or something but that isn't a reality in this project. So i'm restricted to plain old web technologies. I was wondering though, if there is a python solution to my problem (i.e. creating a small script so i can run through a list of given words, output the required HTML, and then copy and paste the HTML into various html files). So if i have a list of words below, could i run a python program, and add the needed divs with the classes to each word. One problem would be the "order" needs to increment to the amount of words given.
animals cat dog mouse lion
What the output should be
<div class="Rtable Rtable--1cols"> <div style="order:0" class="Rtable-cell-head">animals</div> <div style="order:1;" class="Rtable-cell">cat</div> <div style="order:2;" class="Rtable-cell">dog</div> <div style="order:3;" class="Rtable-cell">mouse</div> <div style="order:4;" class="Rtable-cell">lion</div> </div>