# How to add a class attribute to a table created using markdown

**URL:** <https://meta.discourse.org/t/how-to-add-a-class-attribute-to-a-table-created-using-markdown/84338>\
**Category:** Product Support\
**Created:** [April 1, 2018, 6:04pm UTC](https://meta.discourse.org/t/how-to-add-a-class-attribute-to-a-table-created-using-markdown/84338 "2018-04-01T18:04:14Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)\
**Post date:** [June 6, 2018, 11:45pm UTC](https://meta.discourse.org/t/how-to-add-a-class-attribute-to-a-table-created-using-markdown/84338/11 "2018-06-06T23:45:18Z")

</div>

you might be able to do this in a theme using JS on load. You could detect of the user is a mod/admin and add the class

Let me see if I can find code that is close.

---

_[View the full topic](https://meta.discourse.org/t/how-to-add-a-class-attribute-to-a-table-created-using-markdown/84338)._
