Typically when I put together dynamically generated HTML markup, I\'ve been using PHP to store the information and then looping through that to create elements on the page.
If SEO is your concern, things are simple: JS is not indexed.
There also are UI issues: if JS is not enabled, no JS-dependent stuff will load.