Why browser adds automatically a new line after <p> paragraph tag ? How to remove that to continue with the next line? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Why browser adds automatically a new line after <p> paragraph tag ? How to remove that to continue with the next line?

Why briwser adds automatically a new line after <p> paragraph tag ? How to remove that to continue with the next line? please elaborate

17th Mar 2017, 3:03 AM
Himangshu Raj Saikia
Himangshu Raj Saikia - avatar
3 Answers
+ 17
<p style="display:inline">Enter your text</p>
17th Mar 2017, 3:33 AM
Jafca
Jafca - avatar
+ 8
Because definition of paragraph is << a short part of a text, consisting of at least one sentence and beginning on a new line. It usually deals with a single event, description, idea, etc. >>... So, if you want to continue on same line after a paragraph, it's always the paragraph content, or need to be handle in another container behaviour ( as a float element, a positionned one or whatever needed ^^ ), and for applying some css style inline of a paragraph ( or any 'block-level' element ), you need use some <span> element or more semantic 'inline-level' one.
17th Mar 2017, 6:58 AM
visph
visph - avatar
+ 3
because <P> is a block level element
17th Mar 2017, 3:43 AM
Rabiul Islam Razu
Rabiul Islam Razu - avatar