6

I noticed that the P tag in about me section has been replaced recently with H2 tag in Stack Overflow only. For other sites, it's still P tag.

Stack Overflow

Inspect element showing h2 tag.

Travel.SE

Inspect element showing p tag.

As a temporary workaround, starting about me with a closing h2 currently fixes the problem.

2

1 Answer 1

4

There is no bug here. Your Stack Overflow profile contains extra lines that your other profiles don’t have, and those extra lines have specific meaning in Markdown formatting.

The second line in your profile text consists of 3 dashes:

First line
---
<br><br><br><br>

These dashes combine with the line of text immediately above it, and it is this combination that is creating the header.

This syntax is called a setext heading in the CommonMark specification; putting dashes directly under a line of text turns that line into an H2 header:

First line





Had you used = equals signs instead of - dashes you’d have created an H1 header.

If you meant to use the dashes to denote a horizontal ruler (<hr>), you need to have a blank line in between:

First line

---
<br><br><br><br>

which produces:

First line






You must log in to answer this question.

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