# # or ## for language name/program size [duplicate]

I've seen people use # (h1) and ## (h2) on the language name and program size in their answers, but is one of them considered better?

## marked as duplicate by James Holderness, Sriotchilism O'Zaic, 12Me21, Community♦Feb 22 '17 at 3:41

• Note: Try it Online produces # when generating answer headers, which may be why # is more common. – Fatalize Feb 20 '17 at 14:31
• Seems like this is a duplicate of meta.codegolf.stackexchange.com/q/1200/62101 – James Holderness Feb 21 '17 at 22:48

Back in the day, HTML style guides told you to use only one <h1> in a page. Given the semantics of a StackExchange page, that should be the question title. Therefore we old fogies consider ## better.

Nowadays some people consider that advice antiquated. I leave it to them to say whether they consider # and ## equally good or whether they have arguments either way.

As one of the users of #, here's my rationale.

1. Markdown gives you a handy way of grouping your post into (sub)sections using #, ##, and ###. If you use # for the header, you still get sections and subsections. If you use ##, you only get sections.

2. When writing Markdown, I don't really consider the HTML is generates. If <h1> is not meant to be used in answers, # should generate <h2> elements. I can't do anything about this.

3. Having multiple <h1> elements in one page is valid HTML. It used to be a bad idea, but that's no longer true for HTML5.

• Agreed. Some people write <h1> in their answers, but I use #, which isn't HTML, it's markdown. – mbomb007 Feb 20 '17 at 19:57
• Regarding point 3, that article is wrong about the use of H1 in HTML5. There was a time when the draft spec allowed multiple H1s, but they eventually scrapped that idea. The current recommendation is you "should use headings of the appropriate rank for the section's nesting level." I agree with your other points though. – James Holderness Feb 21 '17 at 0:06