Adding a tag | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Adding a tag

Hello everybody! I am following the HTML course. I was playing with the code of the 'About Me' section of the Blog Project. When I added <hr/> just before the end </p> element, a remark appears on the next line where the end </p> is written. It says 'Unexpected end tag p. Ignored'. What does this mean? --> https://code.sololearn.com/WmZ3P6H9QM13/#html. Could you help me out? Thanks! Greets Imane :)

22nd Oct 2018, 9:28 PM
Imane
Imane - avatar
2 Answers
+ 2
as stated here https://developer.mozilla.org/en-US/docs/Web/HTML/Element/p the only permited content inside p is phrasing content. copied from MDN (https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content) Phrasing content defines the text and the mark-up it contains. Runs of phrasing content make up paragraphs. you can see the list of the allowed element at the link above. so you can say what you trying to do here is break the p nature to create a block of paragraph, because hr create its own space and new line. you can always move hr element outside the paragraph, under </p>
22nd Oct 2018, 9:40 PM
Taste
Taste - avatar
0
Thank you very much!!!
1st Nov 2018, 4:09 PM
Imane
Imane - avatar