All Topics
All Topics
Technology
Technology
Design
Design
Programming
Programming
Science
Science
News
News
Gaming
Gaming
Entertainment
Entertainment
Business
Business
Finance
Finance
Sports
Sports
Health
Health
Food
Food
Travel
Travel
Art
Art
Music
Music
Books
Books
Education
Education
Politics
Politics
Personal
Personal
No algorithm. No AI slop. No ads. Just RSS. Pro-human. Indie writers. Real journalism. Open web. Chronological. Hand toasted.

Exploring the HTML Tables API for Programmatic Table Manipulation

By

begoon

7mo ago· 2 min readen

Summary

The article discusses a lesser-known HTML tables API that provides programmatic methods for creating and manipulating tables without using DOM methods or innerHTML. It explains how developers can use this API to loop over tables, create bodies, rows, cells, headers, footers, captions, and summaries, all while avoiding security concerns and performance issues associated with re-rendering entire tables on each change.

Key quotes

· 4 pulled
When people turn data into HTML tables using JavaScript, they either use the DOM methods (createElement() and the likes), but most of the time just append a huge string and use innerHTML, which always is a security concern.
However, did you know that HTML tables also have an old, forgotten API?
Using this one, you can loop over tables, create bodies, rows, cells, heads, footers, captions and summaries (yes, HTML tables have all of those) and access the table cells.
Without having to re-render the whole table on each change.
Snippet from the RSS feed

You might also wanna read