# Consistent attribute syntax

**URL:** <https://talk.commonmark.org/t/consistent-attribute-syntax/272>\
**Category:** Extensions\
**Created:** [September 4, 2014, 10:28am UTC](https://talk.commonmark.org/t/consistent-attribute-syntax/272 "2014-09-04T10:28:34Z")\
**Posts on this page:** 1\
**Showing post:** 23

<div class="post-metadata">

**Author:** ![rwzy](https://cdn.commonmark.org/letter_avatar_proxy/v2/letter/r/3d9bf3/32.png) [@rwzy](https://talk.commonmark.org/u/rwzy)\
**Post date:** [September 8, 2014, 1:15am UTC](https://talk.commonmark.org/t/consistent-attribute-syntax/272/23 "2014-09-08T01:15:52Z")

</div>

As long as the extension directives part is proposed to be an extension and not in the core, I’m okay with it. Except:

- Have the same syntax proposed for headings too, to be able to specify custom anchors and such. (You didn’t list headings as an example.)

* * *

- [136](http://talk.commonmark.org/t/fenced-code-blocks-should-add-class-to-code-rather-than-pre-matching-the-html-best-practice/136) got accepted.

This means that the shorthand inline code example:

```
`code`myClass

```

turns into:

```
<code class="language-myClass">code</code>

```

instead of:

```
<code class="myClass">code</code>

```

Same with the code block example. But I don’t think it’s a problem since it follows the html spec to do that. I’m just clarifying that if you want to actually just indicate `myClass` instead of `language-myClass`, you will have have to use curly braces as such:

```
`code`{.myClass}

```

* * *

- Also, in your fenced code block examples, you use six backticks, but I’m assuming the same numbering rules apply as [already outlined in the spec](http://jgm.github.io/stmd/spec.html#fenced-code-blocks)?

---

_[View the full topic](https://talk.commonmark.org/t/consistent-attribute-syntax/272)._
