# Css classes on any block

**URL:** <https://talk.commonmark.org/t/css-classes-on-any-block/711>\
**Category:** Extensions\
**Created:** [September 25, 2014, 5:57pm UTC](https://talk.commonmark.org/t/css-classes-on-any-block/711 "2014-09-25T17:57:31Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![mb21](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/mb21/32/162_2.png) [@mb21](https://talk.commonmark.org/u/mb21)\
**Post date:** [September 25, 2014, 6:46pm UTC](https://talk.commonmark.org/t/css-classes-on-any-block/711/2 "2014-09-25T18:46:35Z")

</div>

I agree and see the solution in a [consistent attribute syntax](http://talk.commonmark.org/t/consistent-attribute-syntax/272/), as already implemented partially by Pandoc and Markdown Extra.

A span could be done like this:

```
this is a [span]{.myClass} plus more inline content

```

While adding attributes to an entire paragraph is a bit more complicated (see the discussion in that thread) but could be something like:

```
paragraph
{.myClass}

```

I have put [a draft](https://cdn.rawgit.com/mb21/2df5137d0eb5388a20af/raw/c55815cabde030ea3de7315afbe21d4482480ead/CommonMark-attributes-proposal.html#extensions) together and made a [pull request](https://github.com/jgm/stmd/pull/105) which currently includes the spans but not paragraphs.

---

_[View the full topic](https://talk.commonmark.org/t/css-classes-on-any-block/711)._
