验证失败,但我找不到错误原因

问题描述 投票:0回答:2

美好的一天,

在过去的几周里,我曾多次尝试验证我的 HTML 页面,每次都会出现错误,这非常烦人,因为我找不到该部分代码在元素标签未关闭等方面的任何问题。 它告诉我该段落中没有开头段落标记。不过我可以自信地说有...

错误(根据W3验证器):

验证输出:1 个错误

错误第 18 行,第 618 列:范围内没有 p 元素,但看到 p 结束标记。

…="Not Very Popular Name"><strong><q>Name</q></strong></abbr>
> Name</p**>**

之前的代码部分(包括错误位置):

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Living life on the Brink</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
<link rel="stylesheet" type="text/css" href="css/about-me.css">
</head>
<body>
<header class="about-me">
<hr>
<h1>My Name</h1>
<p>I dont normally like talking about myself, so I'll try and express myself and who I am mostly with images, although I am supposed to use the full range of HTML elements which we have learned in week 1 <br>:)</p>
</header>
<div class="location">
<hr>
<h2>Location, location, location...</h2>
<p>I like to think I have an open outlook to things. Having gone from my <em>birthplace</em> in <blockquote><strong>A place</strong><sub>English</sub></blockquote> to my <em>home</em> in <blockquote><strong>A place</strong> <sup>German</sup></blockquote> through my recent <em>educational paradise</em> in <blockquote><strong>A place</strong><sub>Spanish</sub></blockquote> into <blockquote><strong>A place</strong><sup>English <sup>AGAIN</sup></sup></blockquote> all the way to where I stand right now, Another place... <abbr title="Not Very Popular Name"><strong><q>Name</q></strong></abbr> Name.</p>

那么问题可能出在哪里呢?有人可以指出这个错误,这很可能是一个非常明显的错误,但我没有注意到...是否有可能段落元素中嵌套了太多元素?不应该,但有可能吗?

谢谢! 沙伯骑士

html validation error-handling
2个回答
1
投票

<blockquote>
是块级元素,不允许在
<p>
标签内;)

https://developer.mozilla.org/en/docs/Web/HTML/Block-level_elements


0
投票

表单验证错误:BU验证失败!,我们无法验证BAG(品牌=akway),文章类型=壁灯,性别=中性,购买实体ID=3974,
怎样做才是正确的

© www.soinside.com 2019 - 2024. All rights reserved.