没有P元素,但是看到了最终标签
我是编程的新手,最近才从HTML开始,当我试图创建一个示例网站并在验证器上进行检查。同样的计数,有人可以帮助我解决这个问题,以下是IAM的代码。
<!DOCTYPE html>
<html lang="en">
<title>Pizza</title>
<p><h1>My Favorite Pizza</h1></p>
<p><h2>What is <em>Pizza</em>?</h2><a href="https://en.wikipedia.org/wiki/Pizza"></a>
<p>a dish of Italian origin, consisting of a flat round base of dough baked with a topping of tomatoes and cheese, typically with added meat, fish, or vegetables.</p>
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/a/a3/Eq_it-na_pizza-margherita_sep2005_sml.jpg/330px-Eq_it-na_pizza-margherita_sep2005_sml.jpg" alt="Pizza">
<p><h3>What are the types of Pizza?</h3></p>
<ol>
<li>Neapolitan Pizza.
<li>Chicago Pizza.
<li>New York-Style Pizza.
<li> Sicilian Pizza.
<li> Greek Pizza.
<li>California Pizza.
<li>Detroit Pizza.
<li>St. Louis Pizza.
</ol>
<p><h3>examples of Pizza types</h3></p>
<img src="https://image.shutterstock.com/image-photo/pizza-cheese-seafood-260nw-1099161842.jpg" alt="Meat Pizza">
<img src="https://image.shutterstock.com/image-photo/pizza-ham-mozzarella-tomatoes-radicchio-260nw-1085673227.jpg" alt="Vegetables Pizza">
<img src="https://image.shutterstock.com/image-photo/supreme-pizza-pepperoni-mushrooms-mozzarella-600w-1918786631.jpg" alt="Pepperoni Pizza">
<p><h4>Common Places that sells pizza</h4></p>
<p><a href= https://www.instagram.com/pizzastation.eg/>Pizza Station</a></p>
<p><a href="https://www.egypt.pizzahut.me/en/home">Pizza Hut</a></p>
<p><a href="https://www.dominos.com.eg/">Domions Pizza</a></p>
<p><a href="https://www.papajohnsegypt.com/">Papa Johns</a></p>
</body>
Also I made this on my own computer how can I have someone else able to view it?
I am new to programming, just started with HTML recently, and as I was trying to create a sample website and checking it on validator.w3c it gave me the above error, and I am pretty sure that all the start and end tags are exactly the same count, can someone please help me with this, below is the code iam doing.
<!DOCTYPE html>
<html lang="en">
<title>Pizza</title>
<p><h1>My Favorite Pizza</h1></p>
<p><h2>What is <em>Pizza</em>?</h2><a href="https://en.wikipedia.org/wiki/Pizza"></a>
<p>a dish of Italian origin, consisting of a flat round base of dough baked with a topping of tomatoes and cheese, typically with added meat, fish, or vegetables.</p>
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/a/a3/Eq_it-na_pizza-margherita_sep2005_sml.jpg/330px-Eq_it-na_pizza-margherita_sep2005_sml.jpg" alt="Pizza">
<p><h3>What are the types of Pizza?</h3></p>
<ol>
<li>Neapolitan Pizza.
<li>Chicago Pizza.
<li>New York-Style Pizza.
<li> Sicilian Pizza.
<li> Greek Pizza.
<li>California Pizza.
<li>Detroit Pizza.
<li>St. Louis Pizza.
</ol>
<p><h3>examples of Pizza types</h3></p>
<img src="https://image.shutterstock.com/image-photo/pizza-cheese-seafood-260nw-1099161842.jpg" alt="Meat Pizza">
<img src="https://image.shutterstock.com/image-photo/pizza-ham-mozzarella-tomatoes-radicchio-260nw-1085673227.jpg" alt="Vegetables Pizza">
<img src="https://image.shutterstock.com/image-photo/supreme-pizza-pepperoni-mushrooms-mozzarella-600w-1918786631.jpg" alt="Pepperoni Pizza">
<p><h4>Common Places that sells pizza</h4></p>
<p><a href= https://www.instagram.com/pizzastation.eg/>Pizza Station</a></p>
<p><a href="https://www.egypt.pizzahut.me/en/home">Pizza Hut</a></p>
<p><a href="https://www.dominos.com.eg/">Domions Pizza</a></p>
<p><a href="https://www.papajohnsegypt.com/">Papa Johns</a></p>
</body>
Also I made this on my own computer how can I have someone else able to view it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在下面尝试此代码。我已经格式化了它并修复了您的错误。
代码中的错误以及我如何修复它们:
&lt; p&gt;
标签中。在html中,&lt; p&gt;
表示段落,并且将使字体大小16px成为您不希望在标题中的字体。我已经从所有标题中删除了&lt; p&gt;
标签,因为它们不应该在那里。&lt; p&gt;&lt; a href = https://www.instagram.com/pizzastation.eg/>/&gt; /代码>。由于您忘记将URL放入引号上,因此它被认为是一个自结尾标签,因为它具有这种格式:
&lt; tag /&gt; < /code>(带有A /之后的普通标签),这是自我关闭标签是什么样的。以下是一些示例:
&lt; br /&gt; < /code>,
&lt; meta /&gt; < /code>。我在URL周围添加了引号,以使其像普通的锚标签一样。
&lt; title&gt;
放入&lt; head&gt;
标签中。 HEAD标签应包含以下标签(如果您使用的话),而不是所有这些都必须具有):&lt; link&gt;
,&lt; title&gt;
,&lt; meta&gt;
,&lt; style&gt;
,&lt; script&gt;
等它可以到网络主机。 infinityfree 是一个不错的选择,但对于您的第一个网站来说可能会有些复杂。我建议 w3schools spaces 。
祝您好运,进一步学习HTML,您已经开始了,并且做得很好:)
Try this code below. I have formatted it and fixed the errors you had.
The errors in your code and how I fixed them:
<p>
tags. In HTML,<p>
means paragraph, and will make the font-size 16px, which you don't want in a heading. I have removed the<p>
tags from all of your headings as they aren't supposed to be there.<p><a href= https://www.instagram.com/pizzastation.eg/>Pizza Station</a></p>
. Since you forgot to put the URL in quotation marks, it was considered a self closing tag because it had this format:<tag />
(a normal tag with a / after it), which is what self closing tags look like. Here are some examples:<br />
,<meta />
. I added quotation marks around the url so that it acts like a normal anchor tag.<title>
inside a<head>
tag. The head tag should contain the following tags (if you're using them), not all of these are mandatory to have):<link>
,<title>
,<meta>
,<style>
,<script>
, etc.For others to view your website, you need to publish it to a web host. InfinityFree is a good one, but it could be a bit complicated for your first website. I would recommend W3Schools Spaces.
Good luck further learning HTML, you have started off well and are doing a good job :)
您没有
在这里关闭标签。
最后关闭
you haven’t closed
tag here .
Close it in the end