7

I want to include sub-headings in an answer I am writing. I think I have done it before, and I thought it was just a matter of clicking the heading button again.

When I highlight my heading and click the heading button in the toolbar, a line is inserted under the selected line, and this line is filled with dashes "---". If I click heading button again, the dashes are changed to equals signs "===", but the text in the preview area still looks like a full size heading. Clicking the heading button again puts it back to normal with no heading.

My question here is "How do I apply a sub-heading in a Stack Exchange post?" However, is there any place on Stack Exchange that documents the features and what text in the text area represents those features? It would be very useful if a good answer included a link to such documentation. If I knew that "%%% My Subheading %%%" did what I wanted, I could just type it in directly.


Some things I have tried

I have Googled this, which results in a lot of UX/HTML/TeX SE questions about headings with those technologies instead of doing it within a SE question/answer.

I have used SE's search and that is not doing it for me either.

I skimmed through some of the questions in the tag, but that was not helpful.

I would just use bold text instead of a sub-heading, but I think someone criticized me for that one time in the past, if I recall correctly.

3
  • There's a question mark at the top right of the editor. Click it. Then click "Styling/Headers". If you want to get all the options, click on "advanced help". i.stack.imgur.com/0k9CA.png
    – Oded
    Sep 25, 2017 at 16:32
  • @ale What was the purpose of that edit? You changed "StackExchange" to "Stack Exchange" (with a space), but the website often lists the name without a space. Even now, I just scrolled up the page to the logo and verified; no space.
    – Loduwijk
    Sep 25, 2017 at 21:21
  • stackexchange.com/legal/trademark-guidance
    – ale
    Sep 25, 2017 at 21:23

1 Answer 1

21

Are you looking for something like this?

Heading level 1

Heading level 2

Heading level 3

Heading level 4

Heading level 5
Heading level 6

Bold text


Markdown:

# Heading level 1
## Heading level 2
### Heading level 3
#### Heading level 4
##### Heading level 5
###### Heading level 6
**Bold text**

As you noted, you can get the top two levels by putting ==== and ---- under the text you want to make a header. (I use #s because it's less confusing. When using #, the space between the # and the heading text is required.)

All this information can be found in the Help Center page for editing. This page can be conveniently accessed while writing a post by clicking the question mark on the right of the editing toolbar, then "advanced help":

6
  • Thank you. I figured out that I had the === and --- backwards. I was using the --- for headings and === for subheadings and I did not notice that the headings must have been smaller than subheadings - I only noticed that the subheadings were not small enough, hence my question. The help you mention is what brought this to my attention, where it specifies "header1" and "header2" Thank you.
    – Loduwijk
    Sep 25, 2017 at 19:15
  • 1
    Note: there needs to be a space after the # in # MyHeading. That was confusing me Oct 10, 2021 at 17:58
  • @KellenStuart This answer was written before that was the case, but I'll edit
    – Laurel
    Oct 10, 2021 at 19:43
  • @Laurel oh interesting. Didn't know it used to be different Oct 10, 2021 at 19:46
  • @KellenStuart The edit history on this answer (and many other posts) shows Community making an edit for "Commonmark migration". That's what that was for.
    – Laurel
    Oct 10, 2021 at 19:51
  • Yep, that was a change made when SE switched to CommonMark for markdown. For existing posts where the tool couldn't automatically fix all the issues, they weren't re-rendered until they were edited, but not including the space breaks the header formatting for edits to those posts after that point.
    – V2Blast
    Oct 11, 2021 at 15:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .