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 :)
2 odpowiedzi
+ 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>
0
Thank you very much!!!