user profile image

This is a relatively well-known pattern for responsive tables, but it's worthwhile to give a reminder or FYI to the new folks. I've also tried to make it accessible for screen readers.


  1. I've used this method a lot, I generally think it's one of the better ways to display data that needs a certain format to be understood.

  2. Thanks for this, works great and I'm about to implement it on something I'm working on.

    I was wondering, is it an issue that the table header elements have the scope value of col, and when the layout changes their scope should then be row.

  3. This is exactly what I've been looking for. Thanks!

  4. Thank you very much for this pen, Mr. Smith!

  5. I have implemented this and it works fine when I resize the window on desktop, but on mobile, the table still goes outside the borders of the screen?

  6. Thanks! I just created a jQuery plugin which may become handy with tables from content editors. https://github.com/yiannisdesp/simple-responsive-table

  7. Why aren't you using display: none; for the thead (in responsive mode`

  8. @vsync display: none and visibility: none hide elements from screen readers. The code in the thead keeps the data accessible to screen readers while still hiding the element from regular users.

  9. Very good result, but W3Schools says "The

    scope attribute is not supported in HTML5." (https://www.w3schools.com/tags/att_td_scope.asp) Still works, anyway.

Leave a Comment Markdown supported. Click @usernames to add to comment.

You must be logged in to comment.