0
Please tell me sir.which tag used for line break than <br> tag in html only
3 Respuestas
+ 4
there is only one tag in HTML5 that adds line break( is there another one ? ) <br> .
which can also be written as <br> <br /> <br/>(last two used in xhtml).
there is a similar tag which adds a horizontal break-line <hr>. the <p> tag starts a new paragraph with space
https://code.sololearn.com/W9or0EQuF7gF/?ref=app
+ 3
@Lord Krisha: There's only one valid Html5 to write break line element: <br>, even if unvalid are auto-corrected by browsers :P
Any empty block element can be used to insert break line, because of their behaviour (breaking the content stream, unlike inlined block)... so does the <hr> special one (necessarly empty, as <br>).
Another way of displaying/using break line is to use 'normal' one with not usual Html behaviour (default ignore break line char and convert them to space) by embeding text with break lines inside a <pre> element (or giving a 'pre' value to the 'white-space' css property):
<pre>This is a special text:
It will be respectuous of line breaks ;)</pre>
+ 1
Depending on your text and required formatting determines how often you use <br>. I find I ts uses bed in block text that receives the same text treatment and needs to be tightly spaced. Great examples of this are addresses, and signature lines.