html - 需要一些验证错误的帮助

标签 html css validation

嘿,我正在通过 W3C 验证程序运行我的索引页面,但出现 6 个错误,需要一些帮助。错误是:-

Line 57, Column5: error parsing attribute name
Line 57, Column 5: attributes construct error
Line 57, Column 5: Couldn't find end of Start Tag div line 56
Line 67, Column 14: Opening and ending tag mismatch: body line 14 and div 
Line 69, Column 11: Opening and ending tag mismatch: html line 4 and body 
Line 70: Extra content at the end of the document

这是我的代码:-

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

<head>

    <link rel="stylesheet" type="text/css" href="CSS/10000658.css" title="default" />
    <link rel="alternate stylesheet" type="text/css" href="CSS/default.css" title="assignment2" />

    <title>The Garden Co. | Home </title>
</head>

<body>
    <div id="wrapper">
        <div id="header">
           <h1>The Garden Co.</h1>
        </div>

             <div id="menu">

                    <h1>Contents</h1>

                    <ul>
                <li><a href="index.html">Home</a></li>
                        <li>
                            <a href="plants_section/index.html">Catalogue</a>
                            <ul>
                                <li><a href="plants_section/plant1.html">Plant 1</a></li>
                                <li><a href="plants_section/plant2.html">Plant 2</a></li>
                                <li><a href="plants_section/plant3.html">Plant 3</a></li>
                            </ul>
                        </li>

                        <li>
                            <a class="section" href="plants_section/index3.html">Report</a>

                        </li>

            <li>
                            <a class="section" href="plants_section/index4.html">Report(2)</a>

                        </li>


                        <li><a class="section" href="plants_section/form.html">Contact</a></li>

                    </ul>

                </div><!-- end menu -->

              <div id="content">
                 <div id="contentWrapper">
                    <h1>Welcome</h1>

                    <div class="text"
                    ***<p> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus sed eros quis leo sollicitudin tempus.  </p>***

                </div>
            ***</div><!-- end contentWrapper -->***
             </div><!-- end content -->

           <div id="footer">
              <p>&copy; My name, 2012.</p>
           </div>

        </div><!-- end wrapper  -->

***</body>***
***</html>***

如果有人能帮助解决这些错误,将不胜感激。编辑:粗线是发现错误的地方

最佳答案

您没有关闭 <div>第 57 行的标记:

<div class="text"

关于html - 需要一些验证错误的帮助,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10834622/

相关文章:

javascript - 如何在jquery中关闭窗口时进行ajax调用

html - 边框不能覆盖两个div

html - CSS,为什么地址是 "nav a"而不是 "li"?

javascript - 无序列表中的列表项仅在 Internet Explorer 中重叠,在所有其他浏览器中一切正常

javascript - 如何使新输入显示在新行而不是替换旧输入

html - 在css中设置背景图片和颜色

html - 在 Scss 中使用 & 运算符

validation - 实现中的静态分析与符号执行

javascript - Bootstrap 3 默认验证插件

html - 在此上下文中,元素 blue 不允许作为元素 div 的子元素。 (抑制来自该子树的更多错误。)