Skip to content
DevMeme
6525 of 7663
Frontend Post #7153 · source on Telegram

Nested HTML Tables Inside Tables: The Frontend Developer's Nightmare

Description

A screenshot of a browser DevTools Elements panel showing deeply nested HTML structure: a table containing a tbody, containing a tr, containing a td, containing another table, containing another tbody, containing another tr, containing a td, containing a p element with collapsed content, followed by a closing /td. The 'Search HTML' bar is visible at the top. This represents the classic anti-pattern of using nested HTML tables for layout, a practice common in early web development and legacy email templates that makes modern frontend developers recoil in horror

Comments

31
Anonymous ★ Top Pick This HTML structure has more nesting levels than a Russian doll factory. Somewhere a CSS Grid is weeping, knowing it was born 20 years too late to save this page
  1. Anonymous ★ Top Pick

    This HTML structure has more nesting levels than a Russian doll factory. Somewhere a CSS Grid is weeping, knowing it was born 20 years too late to save this page

  2. Anonymous

    This is the kind of HTML that makes you appreciate modern CSS, because the only 'responsive design' here was how quickly you responded with 'I quit' when asked to add a new column

  3. Anonymous

    Remember: every time you complain about CSS Grid, a senior dev quietly flashes back to debugging 8-level table nests with 1-pixel GIF spacers in IE6

  4. Anonymous

    After 20 years in the industry, I still have developers who insist tbody is optional because 'the browser adds it anyway' - the same folks who wonder why their CSS nth-child selectors are off by one and their JavaScript table.rows collection behaves mysteriously

  5. Anonymous

    Ah yes, the classic Russian nesting doll approach to HTML tables - because why use CSS Grid when you can make your DOM tree deeper than your call stack during that one recursive function you wrote at 3 AM? This is the kind of markup that makes accessibility auditors weep and causes browser rendering engines to question their life choices. It's like someone took 'separation of concerns' as a personal challenge to violate as spectacularly as possible. Fun fact: archaeologists have discovered similar structures in codebases from the Geocities era, perfectly preserved in their original horror

  6. Anonymous

    Nothing screams “enterprise” like a layout that’s a recursive <table>; responsiveness handled with colspan and hope

  7. Anonymous

    When DevTools shows table > tbody > tr > td > table, the real redesign debate isn’t Flexbox vs Grid - it’s whether the strangler‑fig can outlive the CMS contract signed in 2004

  8. Anonymous

    Nested tables: the layout recursion that predates Tailwind - and still haunts your enterprise monolith

  9. @TheFloofyFloof 1y

    I had to work on a government system like this in 2023. CSS was barely used outside of some element styling

  10. @SheepGod 1y

    Email code yay

  11. @il_commissario 1y

    nah we didn't do tbody tags back then. it was table > tr > td > table > tr > td all the way down.

    1. @SamsonovAnton 1y

      Where is your <thead> at?! 🙈🙉🙊

    2. @dst212 1y

      Yeah but I've seen many old websites using tables to lay the sections out in the website instead of positioning them with CSS. So they used tables inside tables inside tables... And this is just what it looks like when you inspect the page on a browser

    3. @ZgGPuo8dZef58K6hxxGVj3Z2 1y

      Tbody gets automatically added to the dom by modern browsers. Even if it doesn’t exist in the source

  12. @gorqmorq 1y

    Someone's coding an Excel sheet of Excel sheets

  13. @NexonSU 1y

    well, we didn't use tbody\thead\tfoot tags until... I think chrome? When it became a thing in html code?

  14. @Algoinde 1y

    Who remembers making a box shadow with a 3x3 table?

    1. @hy60koshk 1y

      And every custom-styled button is a 3x3 table with img-s of borders

      1. @NaNmber 1y

        custom-styled button now:

      2. @Algoinde 1y

        nine patches were ahead of its time if you knew how to use the photoshop slice tool

  15. @azizhakberdiev 1y

    golden era of web

  16. @callofvoid0 1y

    then what do you use for displaying tables?

    1. @deadgnom32 1y

      canvas

  17. @b3ntuz1 1y

    Jesus Christ! You should blur the image to avoid mental disorders

  18. @ZgGPuo8dZef58K6hxxGVj3Z2 1y

    Literally only solution if you want your stuff to work on LEGACY legacy stuff

  19. @FunnyGuyU 1y

    In fact table is not yet obsolete. And if you want a table, just use table, not a fancy css.

    1. @Algoinde 1y

      sadly it has a few quirks with relative positioning and overflow that makes it unsuitable even for table data if you want more fancy stuff in the cells than just text

  20. @VexelX 1y

    I used this at my first year Always hate it

  21. @itsTyrion 1y

    that's nothing. if you want to laugh (cry violently), inspect element the twitch chat input box it's like 25 divs deep iirc :) whole site is finest react spaghetti

    1. @azizhakberdiev 1y

      even in react you can have 10 nested components that render one div in the end, that's just skill issue

      1. @itsTyrion 1y

        I know it's a skill issue

Use J and K for navigation