0

Why i can't nest <ul> element inside the <p> element whereas we can nest <ul> element inside the <div> element?

As we know, both <p> & <div> and <ul> elements are block level elements. but why we can nest <ul> in <div> and can't in <p>?

24th Jun 2021, 8:02 AM
Kiran Chaudhary
Kiran Chaudhary - avatar
1 ответ
+ 1
It seems you can nest them. Or do you mean something else? https://code.sololearn.com/WJ5172DsZliS/?ref=app edit: ul style is not applied in p > ul
24th Jun 2021, 10:49 AM
Lisa
Lisa - avatar