简体   繁体   English

HTML中的错误-红色结尾段落标签

[英]Errors in HTML - red ending paragraph tags

This is my first webpage, and the end paragraph tags are red. 这是我的第一个网页,结尾标记为红色。

Can someone tell me what I have done wrong, please? 有人可以告诉我我做错了什么吗?

This is my code. 这是我的代码。 It was working fine, but when I have tried to add some CSS to it, it started displaying my text in a weird way, so I assume it must have some errors in my code. 它工作正常,但是当我尝试向其中添加一些CSS时,它开始以一种奇怪的方式显示我的文本,因此我认为它的代码中肯定有一些错误。

 <body> <header> <h1><a href="http://epro.motorparks.co.uk/?" title="Engagement Pro">Engagement Pro</a></h1> </header> <section> <h2>Frequently Asked Questions</h2> <h3>Below you will find answers to the questions we get asked the most about Engagement Pro.</h3> <div> <p> Managers <ul> <li>Why can't log in?</li> <li>A lead came through with no contact details, how do I remove it?</li> <li>I have added a comment to an unlogged lead, why is it not excluded?</li> <li>A guest enquired twice, but when I created the enquiry it didn't link to the other one.</li> <li>Where do I find leads that are being added in my diary by reception?</li> </ul> </p> <p> Sales associates <ul> <li>Why can't log in?</li> <li>Why doesn't the 'Export to Pinnacle' button work?</li> <li>Why do I have guests I know nothing about in my diary?</li> <li>Is there an easier way to see my diary for today, other han changing the date range?</li> <li>When adding an appointment, it doesn't show in my appointments diary</li> <li>Why are the postcodes highlighted yellow or green sometimes?</li> </ul </p> <p> Product geniuses <ul> <li>Why can't log in?</li> <li>Why does my video have so little views?</li> <li>Why can I not save a video?</li> </ul> </p> <p>For any other questions/suggestions please contact Steven Harris or Andreea Mitel.</p> </section> <footer> </footer> </body> 

您必须注意, <p>元素中不允许使用<ul>

I found some code error in your code and fixed them with HTML comment. 我在您的代码中发现一些代码错误,并使用HTML注释对其进行了修复。 Hope now it will work fine for you! 希望现在对您来说一切正常! :) :)

Here one thing to remember that: ul elements are not legally allowed inside p elements. 这里有一点要记住: ul元素在p元素内是合法不允许的。 Here is the reason . 这是原因 In your code you also forget to close some tags/some end tags are missing. 在您的代码中,您还忘记关闭一些标签/缺少一些结束标签。

 <body> <header> <h1><a href="http://epro.motorparks.co.uk/?" title="Engagement Pro">Engagement Pro</a></h1> </header> <section> <h2>Frequently Asked Questions</h2> <h3>Below you will find answers to the questions we get asked the most about Engagement Pro.</h3> <div> <p>Managers</p> <!-- Properly closing <p> --> <ul> <li>Why can't log in?</li> <li>A lead came through with no contact details, how do I remove it?</li> <li>I have added a comment to an unlogged lead, why is it not excluded?</li> <li>A guest enquired twice, but when I created the enquiry it didn't link to the other one.</li> <li>Where do I find leads that are being added in my diary by reception?</li> </ul> <p>Sales associates</p> <!-- Properly closing <p> --> <ul> <li>Why can't log in?</li> <li>Why doesn't the 'Export to Pinnacle' button work?</li> <li>Why do I have guests I know nothing about in my diary?</li> <li>Is there an easier way to see my diary for today, other han changing the date range?</li> <li>When adding an appointment, it doesn't show in my appointments diary</li> <li>Why are the postcodes highlighted yellow or green sometimes?</li> </ul> <!-- <ul> was not properly closed --> <p>Product geniuses</p> <!-- Properly closing <p> --> <ul> <li>Why can't log in?</li> <li>Why does my video have so little views?</li> <li>Why can I not save a video?</li> </ul> <p>For any other questions/suggestions please contact Steven Harris or Andreea Mitel.</p> </div> <!-- Closing <div> was missing --> </section> <footer> </footer> </body> 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM