Reputation: 10520
I am super new to HTML, so I am not sure if I need to use a Javascript function to implement this, or how to even begin. I would like to create a table that grows and shrinks based on the data received. I know that HTML has a table tag, and I have been playing around with it, but I don't know how to make it create cells based on varying data.
Upvotes: 0
Views: 2079
Reputation: 1271
What are you using to populate your data? As far as I know HTML5 has the same tags for the table manipulation. So if you are using PHP or .NET, you usually have something like a loop that creates as many rows as you need with the data from the database or other data source. It may look something like that
declare variable to hold table data
add <table>
tag
do your loop that adds rows
add </table>
tag
post the variable to some place on your page to display the table.
Upvotes: 1