Setext headers have two levels only.
- Equal signs for H1
- Dashes for H2
- Any number of equal signs or dashes in the line directly below the heading text should work, although Obsidian seems to need two dashes (unlike other Markdown editors) for H2
Atx header have six levels, with the levels correlating with the numbers of hashes (#) used.
See Gruber.
The following CSS snippet can be customised to use whatever monospace font you want in source view / live preview.
```CSS
.markdown-source-view.mod-cm6 .cm-scroller {
font-family: 'Courier New', Courier, monospace;
}
```
And this snippet can be customised to format headers in source and reading modes:
```CSS
header.cm-header-1, .HyperMD-header-1, .markdown-preview-view h1 {
font-size: 1.5em;
color: var(--header);
font-weight: 400;
margin: 0px 3px 6px 5px;
}
.cm-header.cm-header-2, .cm-header.cm-header-2, .HyperMD-header-2, .markdown-preview-view h2 {
font-size: 1.4em;
color: var(--header);
font-weight: 400 !important;
margin: 0px 3px 6px 5px;
}
.cm-header.cm-header-3, .HyperMD-header-3, .markdown-preview-view h3 {
font-size: 1.3em;
color: var(--header);
font-weight: 400 !important;
margin: 0px 3px 6px 5px;
}
.cm-header.cm-header-4, .HyperMD-header-4, .markdown-preview-view h4 {
font-size: 1.2em;
color: var(--header);
font-weight: 400 !important;
margin: 0px 3px 6px 5px;
}
.cm-header.cm-header-5, .HyperMD-header-5, .markdown-preview-view h5 {
font-size: 1.1em;
color: var(--header);
font-weight: 400 !important;
margin: 0px 3px 6px 5px;
}
.cm-header.cm-header-6, .HyperMD-header-6, .markdown-preview-view h6 {
font-size: 1em;
color: var(--header);
font-weight: 400 !important;
margin: 0px 3px 6px 5px;
}
```
I’m sure some other users will have better CSS snippets than my hacks, but they do work when tried in a test vault.
If you want to see source code when in live-preview mode, you have to toggle it on:
Angel