When using code like:
<h2>Text</h2>
<h2>More Text</2>
It ends up like:
Text
More Text
and for some reason it’s like there’s like an invisible barrier to the right of the two texts so I can’t place one next to the other (or even to the opposite side of the screen).
This is what I want it to look like:
Text More Text
2
Answers
h2 is a header element.
It’s supposed to look like that.
In HTML, there are two types of elements:
block
andinline
.The
h2
element is a block element.According to w3schools
for example :
You can modify these behaviors using CSS.