new line html
- There are various ways to break the line without using
<br>
tag. - Use block-level elements to break the line without using
<br>
tag.
html new line without br
- white-space: pre; It is used to make elements acts like
<pre>
tag.
<div class="preDis"> Hello World Hello World </div>
.preDis { white-space : pre; }
Hello World
Hello World
html new line without space
- display: block; It sets the display property of elements to block.
<h2> <span>Hello World</span> <span>Hello World</span> </h2>
h2 span { display: block; }
Hello World
Hello World
`