HTML have bothered me since HTML1 emerged.
One thing is about line breaks.
<p>1</p>
<p>2</p>
<p>br1</p>
<br/>
<p>br2</p>
<p>p1</p>
foo
<p>p2</p>
<p>pp1</p>
<p>foo</p>
<p>pp2</p>
p tag has 1 line between the element.
Is it impossible to have 2 blank lines between <p>
?
It appears <br/>
or space symbol doesn't work for that.
Well, of course, it's possible to use <br/>
instead of <p>
, but now I tweak Markdown, especially gfm, so I need to preserve paragraph structure.
I short, it's way too strange that we never be able to have 2 blank lines as long as we stick on <p>
.
What I consider is
foo
bar
2 blank lines:instead of
foo
bar
3 blank lines with p tag structure.
EDIT:
Well, what I intended is to have consistent structure of P tag, but thanks to everyone, I've got a hint that I can prepare multiple classed p tag with CSS hack.
This is truly hacky on first thought, but I think I can manage it. Appreciated to all comments.
EDIT2:
I thought we have solution for this, but it seems not; I post another:
Try this:
nbsp means "non-breaking space".
White space in your mark up (new lines, spaces) will not show up on the front end of a website.
This:
Is the same as:
On a website, both those examples will appear exactly the same.
To control spacing, padding, margin and position on the front end of a website we use css:
HTML
CSS
Here is a demo showing different paragraph margins controlled by css:
HTML
CSS
Demo
If I understand you correctly it seems to be working for me. But one thing is the correct syntax for line break is:
Or style it like one of these
A line height in percent of the current font size