# How to create different heading levels in lang-markdown

**URL:** https://discuss.codemirror.net/t/how-to-create-different-heading-levels-in-lang-markdown/2943
**Category:** v6
**Created:** [February 20, 2021, 7:17pm UTC](https://discuss.codemirror.net/t/how-to-create-different-heading-levels-in-lang-markdown/2943 "2021-02-20T19:17:52Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![HelpfulScripts](https://discuss.codemirror.net/user_avatar/discuss.codemirror.net/helpfulscripts/32/1080_2.png) [@HelpfulScripts](https://discuss.codemirror.net/u/HelpfulScripts)
#### Post date: [February 20, 2021, 7:17pm UTC](https://discuss.codemirror.net/t/how-to-create-different-heading-levels-in-lang-markdown/2943/1 "2021-02-20T19:17:52Z")

</div>

I’m new to CM6 and having problems with getting the `lang-markdown` module to distinguish between different levels of headings. All levels seem to be mapped to `t.heading` instead of `t.heading1`, `t.heading2` etc. How would I extend the language to achieve that?

The example below shows that both the `#` and `##` headers have the same `ͼy` class associated:

```
<div class="cm-line">
    <span class="ͼy ͼ11">#</span>
    <span class="ͼy"> main</span>
</div>

<div class="cm-line">
    <span class="ͼy ͼ11">##</span>
    <span class="ͼy"> second level heading</span>
</div>
```

---

<div class="post-metadata">

### Author: ![marijn](https://discuss.codemirror.net/user_avatar/discuss.codemirror.net/marijn/32/136_2.png) [@marijn](https://discuss.codemirror.net/u/marijn)
#### Post date: [February 22, 2021, 10:48am UTC](https://discuss.codemirror.net/t/how-to-create-different-heading-levels-in-lang-markdown/2943/2 "2021-02-22T10:48:11Z")

</div>

As of `@codemirror/lang-markdown` 0.17.3, headings emit the appropriate `heading1` to `heading6` tag, which highlight styles can target to apply different styling.
