# How would you pass a class to markdown?

**URL:** <https://discourse.gohugo.io/t/how-would-you-pass-a-class-to-markdown/29015>\
**Category:** support\
**Created:** [October 24, 2020, 2:43pm UTC](https://discourse.gohugo.io/t/how-would-you-pass-a-class-to-markdown/29015 "2020-10-24T14:43:25Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Grob](https://avatars.discourse-cdn.com/v4/letter/g/f14d63/32.png) [@Grob](https://discourse.gohugo.io/u/Grob)\
**Post date:** [October 24, 2020, 3:19pm UTC](https://discourse.gohugo.io/t/how-would-you-pass-a-class-to-markdown/29015/2 "2020-10-24T15:19:28Z")

</div>

This is not possible.

Yet, you can make a shortcode which converts markdown within `<div />` to HTML.

> [@Set custom classes within Markdown content](https://discourse.gohugo.io/t/set-custom-classes-within-markdown-content/20627):
>
> In Jekyll, you’re able to set custom classes for sections within Markdown itself. For example, if I wanted to add a special ‘warning’ class to a block quote I could do: \> Beware! {: .warning} And it would render into \<blockquote class="warning"\> Beware! \</blockquote\> Is something similar possible within Hugo?

---

_[View the full topic](https://discourse.gohugo.io/t/how-would-you-pass-a-class-to-markdown/29015)._
