元素文章不允许作为元素main的子元素

  • 本文关键字:元素 main 文章 不允许 html
  • 更新时间 :
  • 英文 :


我有这个代码,我使用这个HTML验证器来检查它:https://validator.w3.org

当我把这段代码放进去时,出现了一个错误:元素文章在这个上下文中不允许作为元素main的子元素我真的不明白。

这是我的代码:

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Vuestras mascotas</title>
</head>
<body>
<header>
<nav>
<a href="inicio.html" target="_self">Inicio</a>
<a href="informacion.html" target="_self">Informacion</a>
<a href="formulario.html" target="_blank">Formulario</a>
<a href="vuestrasmasc.html" target="_self">Vuestras mascotas</a>
<a href="faq.html" target="_self">FAQ</a>
</nav>
</header>
<main>
<h1>Vuestras mascotas</h1>
<arcticle>
<h2>Estas son alguna de vuestras mascotas:</h2>
<section>
<h3>PatoLucas</h3>
<p>Subespecie: Anatino</p>
<p>Hola! Me llamo PatoLucas. Soy un pato de 4 años! Me gusta mucho nadar en la piscina y soy un poco
travieso jijiji. Me encanta graznar a las 05:00am y despertar a mi familia.</p>
<img src="imagenes/pato1.png" alt="PatoLucas" width="250" height="250">
</section>
<section>
<h3>Paquito</h3>
<p>Subespecie: Tardonino</p>
<p>Mi nombre es Paquito. Soy un pato que le encanta viajar en furgoneta con sus dueños. Mi ultima
aventura ha sido recorrernos todo Europa en furgoneta. Sigueme en mi canal de youtube
@paquitoViajerito y se mi nuevo amigo de aventuras.</p>
<img src="imagenes/pato2.png" alt="Paquito" width="250" height="250">
</section>
<section>
<h3>Lazo</h3>
<p>Subespecie: Mergino</p>
<p>Encantada :) me llamo Lazo. Soy una patita de Portugal que le encanta robar lazos. Soy mas bien
tranquilita, y me gusta quedarme en el sofa sentada junto a mi familia. Me gusta mas la comida de
mis dueños que la mia, pero no me suelen dar :(</p>
<img src="imagenes/pato3.png" alt="Lazo" width="250" height="250">
</section>
</arcticle>
</main>
<footer>
<p>© 2021 Tyler de Mier</p>
</footer>
</body>
</html>

下面是validator.w3.org给出的完整错误信息:

Error: Element arcticle not allowed as child of element main in this context. (Suppressing further errors from this subtree.)
From line 22, column 9; to line 22, column 18  
>↩        <arcticle>↩   

第23行:

<main>
<h1>Vuestras mascotas</h1>
<arcticle>  <-- Line 23
<h2>Estas son alguna de vuestras mascotas:</h2>

很简单:" article "不是一个有效的HTML元素名。可能只是打错了。尝试将它(和结束标签)更改为article

相关内容

最新更新