Turning the Tables

in #html3 years ago

turnedtables.jpg

The picture shows a flipped table. The table stands on its legs when people visit. I flip it whenever the wind blows. Judging from the leaves on the table, we have not had visitors for several months ... that darn COVID.

The table picture adorns a post about HTML Tables. I have to apologize for the length of this comment. Unfortunately, this post is not about technology. It is about a stupid culture war that adversely affects our use of technology.

Some readers might already be familiar with this culture war.

An Unnecessarily Long Description of Tables

I am interested in data-driven web sites. Relational databases store data in tables. The command "SELECT * FROM Table" will display the data in a table in tabular format.

Most command line shells and database browsers will have two primary modes for displaying data in tables: The list mode and line mode.

The list mode will display the data in a tabular format. The header line (aka the top line of the table) will display the names of the columns.

The body of the table will show the information in rows with each column in the row displaying the data relevant to the given header.

In line mode, the database browser will display a two column table that shows the labels in the first column and the data for the row in the second column.

A robust data browser will easily toggle between these two modes.

Displaying Tables in HTML

Here is a general question: What is the best tag to use for displaying tables in HTML. I will make it multiple choice. I beg you to answer this question:

  • ARTICLE
  • DIV
  • NAV
  • or TABLE?

Okay, I believe that one should use the TABLE tag to display data from tables. The TABLE opens a structure that allows programmers to describe the elements of a table. The TR tag separates rows. The TH tag denotes column headers and the TD denotes data elements in the tag.

Using the TABLE tag, programmers can easily display data from databases with very little additional formatting.

The TABLE tag is somewhat responsive. The programmer can hand a TABLE structure to a web browser and the browser will optimize the display for the user.

Since tables were designed to be responsive. Some programmers used the TABLE tag as the primary design element for their site.

A Data Driven Web Site

Ahem ... the TABLE tag should be the primary design element in a data driven web site.

Now for the Culture War

Because tables were somewhat responsive, a large number of programmers took to using tables as the primary design element in their sites. (Did I mention that the TABLE tag should be the primary design element for data driven sites).

In the 2000s, the Technorati ran a culture war against the TABLE tag.

The Technorati trained an army to march against anyone who used the TABLE tag.

I had developed a nice little chest of tools that allowed users to browse through (and selectively modify) data in tables with their browser.

Gasp: I had tools that displayed Database Tables with the TABLE tag.

Anyway, this was one of my many bouts with cancel culture. I lost my job and the ability to gain employment because I used an HTML tag in the way it was intended.

Because the cancel culture attacked using the TABLE tag to display tables, the industry stopped developing the TABLE tag. It used to be possible to right align tables with the COL tag. They took that away.

Tables should be inherently sortable. Because the cancel culture attacked the use of TABLES; we have to write tables in JavaScript to add sorting features.

Using TABLES for Forms

Now, for the point of this post ...

Okay, I mentioned that database browsers often have two modes. LIST will display all of the data in a two dimensional format. The first row (aka the Header Row) often shows the names of the columns in the first rows.

The body of the table will rows of data below the headers.

LINE mode shows a single row of data in a two column table.

Now, lets consider a Web Form.

In most cases, HTML forms will either UPDATE an existing ROW in a TABLE or the form will INSERT a new ROW.

Database products before the creation of the WWW used the LINE MODE to INSERT or UPDATE database ROWs.

In other words. Any form that gathers tabular data should use the TABLE tag for formenting.

The first row of the TABLE shows the column names. I usually call this column the prompt. The second column should hold the INPUT tags.

Using the TABLE tag for data entry forms has the positive effect of highlighting the database structure that holds the data.

Cancel Culture is Ridiculous

The cancel culture is ridiculous.

Progressive schools teach students to form outrage mobs who then march into the work force and begin attacking people for the most ridiculous things.

I lost jobs and my ability to get new jobs simply because I use the TABLE tag to gather tabular data.

LABELing is the Answer!

The Technorati introduced a new tag called a LABEL. With a little contorted CSS, people can make the LABEL tag (which is an inline tag) function like a TABLE tag (which is a block element).

I've developed web sites that use nested DIV tags and LABEL tags to mimic TH tags.

I dislike this design because I think it is stupid.

A Better Answer is to Ignore the Technorati

Personally, I believe the best answer is to ignore the Technorati. The Technorati attempts to control technology through group think and mob action.

I am usually left standing on my own. As I mentioned, I lost my job because I used the TABLE tag to format forms that gathered tabular data. If you were an employer and you knew that hiring person X might attract an outrage mob; would you hire that person?

Resisting sounds like a noble idea but should one resist when the resistance might affect others?