I am creating a website and I find myself doing </br></br>
a lot in order to create a new paragraph looking like this...
Paragraph 1
Paragraph 2
I have already created a <tab>
tag to indent paragraphs but I am wondering if I could create a <break>
tag and in puts in two new lines to save me some time.
Can anyone point me in the right direction?
Thanks!
-Henry
To do a line break in HTML, use the <br> tag. Simply place the tag wherever you want to force a line break.
To add a line break to your HTML code, you use the <br> tag. The <br> tag does not have an end tag. You can also add additional lines between paragraphs by using the <br> tags. Each <br> tag you enter creates another blank line.
If <p>
are not needed semanticly(?), you may change <br/>
defaut values:
br {
margin:2.5em 0;/* FF for instance */
line-height:5em;/* chrome for instance */
}
http://codepen.io/anon/pen/cJwDhI <=here it's 5em, to make it obvious :)
Use a <pre>
tag. It saves the formatting within.
<pre>
My first line.
My second line after two line breaks.
</pre>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With