+ 12

What is the difference between <p> and <br>?

13th Aug 2017, 10:58 AM
David Sebastian Keshvi Illiakis
David Sebastian Keshvi Illiakis - avatar
20 Respuestas
+ 14
They are both HTML, oh wait that was a right answer... oops
13th Aug 2017, 11:01 AM
SoraKatadzuma
SoraKatadzuma - avatar
+ 12
p=paragraph (container) br=new line
13th Aug 2017, 10:59 AM
Nithiwat
Nithiwat - avatar
+ 11
<p> stands for paragraph and is used to define a paragraph in HTML , <p> is a container tag , so <p> must be closed.If you close <p> and start another <p> the next para will start from new line , Here <br> (stands for break rule)Which is an empty tag comes handy , rather than starting a new paragraph for new line use <br> 😂👍 and enclose all sentences in a single tag. Eg- <p> Mouse ate the cheeze <br> and the the mouse died <br> because Cheeze was poisoned😂😂</p>
13th Aug 2017, 4:31 PM
un1xx
un1xx - avatar
+ 8
what are those
13th Aug 2017, 11:00 AM
David Sebastian Keshvi Illiakis
David Sebastian Keshvi Illiakis - avatar
+ 8
p inserts donald trumPs face, br inserts tim BeRners-lee's face
13th Aug 2017, 11:05 AM
Supersebi3
Supersebi3 - avatar
+ 8
Lol supersebi 😂
13th Aug 2017, 11:05 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 7
p inserts image, br inserts a bracket ([)
13th Aug 2017, 11:01 AM
Supersebi3
Supersebi3 - avatar
+ 7
i dont understand guys
13th Aug 2017, 11:05 AM
David Sebastian Keshvi Illiakis
David Sebastian Keshvi Illiakis - avatar
+ 6
First one needs a closing tag other doesn't needs
13th Aug 2017, 11:00 AM
Harsh
Harsh - avatar
+ 6
cheese is great cheeze is suc
13th Aug 2017, 11:01 AM
EmptyBox
EmptyBox - avatar
+ 6
<br(optional / behind)> is a line break which means that wherever you are currently at it will print a new line. <p></p> is a paragraph to insert text and format.
13th Aug 2017, 11:04 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 4
<p> is penguin and <br> is brrr : expression of feeling cold
12th Sep 2017, 3:28 AM
Mubashir Ahmed
Mubashir Ahmed - avatar
+ 4
@Uniq RIP mouse 😂😂😂
12th Sep 2017, 7:11 AM
Mubashir Ahmed
Mubashir Ahmed - avatar
+ 4
<p> is a paragraph while <br> is a line break
12th Sep 2017, 7:14 AM
Samuel Agbanagba
Samuel Agbanagba - avatar
+ 3
p is the 16th letter in the alphabet and br does not exist.....
13th Aug 2017, 2:59 PM
Abdullahi Shitu
Abdullahi Shitu - avatar
+ 2
@David imagine that you write a paragraph contains 10 sentences.you write it in <p> tag. it is ok to write all sentences together but what if you want to give 2 line space in your paragraph. in that point you use <br> tag twice to solve your problem . try to use br tag twice and p tag twice to see difference p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed scelerisque faucibus tristique. Mauris in semper metus. Curabitur velit sem, accumsan ac efficitur et, rutrum eget elit. Maecenas ultricies, mauris tempus finibus sodales, risus augue eleifend nunc, vel imperdiet nulla odio quis lectus. Interdum et malesuada fames ac ante ipsum primis in faucibus. In ornare est sit amet lacus placerat imperdiet. <br><br>Pellentesque odio metus, pharetra ut cursus vel, laoreet nec augue. Phasellus suscipit egestas lacus. In accumsan arcu laoreet, luctus ipsum eget, pharetra ex.</p>
13th Aug 2017, 11:21 AM
Melih Melik Sonmez
Melih Melik Sonmez - avatar
+ 2
@nico i need to fix your post block elements can contain other block elements but inline elements can not contain please check the link below https://code.sololearn.com/W8sLiYW0Cj9y/?ref=app
13th Aug 2017, 11:35 AM
Melih Melik Sonmez
Melih Melik Sonmez - avatar
+ 2
Thank you Melih! Much appreciated
13th Aug 2017, 11:36 AM
Nico Rob.
Nico Rob. - avatar
+ 2
@david i made a template that you might wanna check https://code.sololearn.com/W9xbqzMST51U/?ref=app
13th Aug 2017, 1:30 PM
Melih Melik Sonmez
Melih Melik Sonmez - avatar
0
<P> tag is a container element which marks a block of text as a paragraph in a webpage and the web browser leaves a line between two paragraphs. This tag has an attribute ALIGN, which can take three values - left,right and centre . E.g- <P ALIGN=“right”> </P> <BR> tag is an empty element that is used to break a line and display the proceeding text from the next line, without giving any space between two lines. It has no attribute.
11th Sep 2018, 12:17 AM
Aysha