Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

11
  • 13
    Side-note, actual 4th-, 5th-, and 6th-level headings might be nice. Rare that I want them (and there’s an argument to be made that anytime one does, it implies something structurally wrong with the post), but sometimes I feel it would be the right option and it’s unavailable. Commented Jan 26, 2021 at 23:19
  • 9
    Nice catch. There's been some internal discussion recently on whether we want to allow h4-h6 in markdown. Historically, we don't allow these because... well, nobody I asked could remember exactly why. In the meanwhile, it was more work to disallow these in the Editor, so they were left in. I'll resume discussions on allowing h4-h6 everywhere (not just in the new Stacks-Editor) and fix one or the other. Commented Jan 27, 2021 at 22:20
  • 6
    For what it's worth, I see no need for h4-h6 on Stack Exchange. We're not writing posts long enough, or we shouldn't be. Commented Jan 27, 2021 at 22:30
  • 9
    @BenKelly - there's an argument to be made that we shouldn't be using h1 in posts at all, because it's semantically incorrect to place it underneath the other h1 and h2 tags used to render the actual page Commented Jan 28, 2021 at 23:57
  • 1
    @Robotnik It be a bit confusing to have single # not work, though? Or, out of the expected behavior, anyway. I don't generally use H1, to be fair - you can see in the question here that my headers are all H2 and H3 - but I wonder if it's still reasonable to argue that post headers aren't the same? I'm pretty sure they're not actually formatted the same as page headers. That said, I'm not a web dev so maybe what I'm saying doesn't make sense. Commented Jan 30, 2021 at 22:10
  • @Catija, couldnt agree more. I feel that it would be highly confusing to have a "wrong" order in the headers. Although I do understand Robotniks point, that using H1 is rather wrong. I don't feel whe should disable it in any shape or form. Commented Jan 31, 2021 at 0:06
  • 13
    @Catija One could cause # to create an h2 “under the hood,” so to speak (and cause the h2 within Qs and As to look like the h1 does now), and then ## would produce an h3, and so on and so forth. The reason for this is that having a single h1 on a page is a rather major web-accessibility standard—just last week my development team got slapped pretty hard for missing that one. Legal was very concerned about it getting us sued (that site is legally obligated to maintain a certain level of accessibility). Commented Jan 31, 2021 at 4:07
  • 5
    @AsteroidsWithWings On RPG, we’re pretty often quoting things that have headers in them, which means if we want our own headers above them, we can push into h4 territory (especially if we’re avoiding h1 for accessibility reasons, which we should). Somewhat niche case, and even there it doesn’t come up often, but if it’s literally a matter of removing a special block on them, it seems worthwhile to have them. Commented Jan 31, 2021 at 4:09
  • 2
    @Catija making # output a <h2> (and bumping down ## and ### to <h3> and <h4>) would solve the semantic problem, and you could change the font size/styling to match, so visually there'd be no difference. Commented Feb 1, 2021 at 0:28
  • 2
    @Robotnik Related discussion under this answer on New post formatting. The problem of changing the Markdown header semantics is that all posts would need to be migrated again, but which semantics should be used? If all ## Headers become <h3>Header</h3>, then this breaks all posts of mine, since I use Markdown headers correctly all the time. Maybe, the migration script can figure out if # Header is used, or not, and based on that, shift everything one level down, or leave it as is. And then I’d need to relearn the Markdown semantics… Commented Feb 1, 2021 at 3:41
  • 1
    I believe SE now supports h4-h6 headings, so this is status-completed. Commented Apr 11, 2022 at 14:17