Using javascript to create html is usually a bad idea, because javascript has not been developed for this, and there is nothing about javascript that makes it well suited for this task. You generate much better html with a server language like php, which is commonly used to create html.
Dan m source
share