0

what is the purpose of <p>,<span>

i can't identify difference

3rd Aug 2017, 12:51 PM
R.Amrish babu.
R.Amrish babu. - avatar
3 odpowiedzi
+ 4
p is a block element and span is an inline element.. in p tag if you write something it will be displayed with a line break.. but when you write something in span tag.. there won't be any line break otter the texts.. and since p tag is an block level element it can be nested with one or more elements.. but span tag can not nest elements. but if try doing it then the p tag will override the span tag.. that is the p tag nested in span tag will not behave as inline it will always be block element
3rd Aug 2017, 1:02 PM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
+ 4
3rd Aug 2017, 1:04 PM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
+ 1
so thank you i understand clearly
3rd Aug 2017, 1:05 PM
R.Amrish babu.
R.Amrish babu. - avatar