Inline attributes are not part of the Markdown “standard,”, but you can use mmark with Hugo. Just use a mmark file extension for your content. See the Inline Attribute Lists section of the mmark Syntax page or this blog post on how to use inline attributes.
Thank you all for the answers! I needed this feature too, and was glad to find mmark supporting setting the class (and other attributes) in its implementation of Markdown tables.
Here is an example summarizing the answers above:
---
markup: "mmark"
---
{.table .pure-table .table-striped .table-responsive}
Name | Age
--------|-----:
Bob | 27
Alice | 23
@Mikhail Thank you so much for your reminder! I totally forgot about https://github.com/gohugoio/hugo/issues/1970! Rest assured, mmark support in Hugo isn’t going away, but I really need to get that issue (helpers: Mmark support incomplete, e.g. missing EXTENSION_ABBREVIATION) fixed soon. Can’t believe it has been over 2 years ago! Time flies!