https://about.gitlab.com/handbook/product/technical-writing/markdown-guide/#headings
For our Blog, everything in this guide can be applied. Read through the Blog Style Guidelines and the Professional Writing Techniques for further information.
## Heading h2
### Heading h3
#### Heading h4
Output
Notes:
We don't use h1
headings, as they already are displayed on every page as its title, and we should not apply more than one h1
per page.
When you use a top level heading, or an <h1>, you’re setting up a semantic relationship between that heading and the remainder of the content on a page, describing what it is about. If you then use a second <h1> on the same page, you’re creating some potential confusion, because someone, or a search engine might see that as the ending of the semantic relationship between the content after the first <h1> and the start of this new <h1>. SEO Guide
Always start with h2
(##
), and respect the order h2 → h3 → h4. Never skip the hierarchy level, such as h2 → h4.
The six heading elements, H1 through H6, denote section headings. Although the order and occurrence of headings is not constrained by the HTML DTD, documents should not skip levels (for example, from H1 to H3), as converting such documents to other representations is often problematic. W3C
Always leave a blank space between the hash #
and the text next to it, otherwise it won't render properly.
For keeping the text clear and the markdown consistent, jump a line between any heading and its subsequent paragraph.
Regular paragraphs are obtained by just writing text lines. If you hit enter between two lines, both lines will be joined into a single paragraph, which is called wrapping text. But, if you leave a blank line between them, they will split into two paragraphs.
It is a best practice to write each a paragraph on a single line. Don't put line breaks at the end of each sentence, and don't break up lines at a certain character limit. It is very difficult to review and edit copy with artificial lines breaks.
In some Git tools, diffs
in future MRs may be easier to understand with additional line breaks, however GitLab's web interface as well as many desktop Git tools feature substring change highlighting within lines and side-by-side or similar version comparison so there is no need for artificial line breaks.
We usually break the lines within paragraphs to facilitate reviews. Do not leave blank spaces after the last word of the line broken within a paragraph, unless you want it to be intentionally broken with a <br>
.
This text is a paragraph.
This won't be another paragraph, it will join the line above it.
This will be another paragraph, as it has a blank line above it.
Output
This text is a paragraph. This won't be another paragraph, it will join the line above it.
This will be another paragraph, as it has a blank line above it.
In case you need an additional break (or some extra space between lines), you can simply use the HTML break tag <br>
, leaving blank lines above and below it: