0

我通过验证器 w3 将此文档检查为 XHTML 时发现 1 个错误。这真的让我很烦,因为我已经看过很多次了,但我找不到它。任何人都可以发现它吗?

太感谢了!

这就是我得到的:

验证输出:1 错误

Error Line 342, Column 7: end tag for "div" omitted, but OMITTAG NO was specified

</body>

✉

You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
Info Line 190, Column 5: start tag was here

    <div class="wrapper2 col4">

我的代码:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN" lang="EN" dir="ltr">
<head>

<title>The Pig &amp; Whistle SW18</title>

<!-- meta tags -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></meta>
<meta http-equiv="imagetoolbar" content="no"></meta>
<link rel="stylesheet" href="styles/layout.css" type="text/css"></link>

<meta name="description" content="The Pig and Whistle is Pub situated in Earlsfield, South West London, serving the lovely areas of Wimbledon, Southfields and Wandsworth. Once an off licence and hardware store in 1974, the Pig and Whistle is a great pub with mostly friendly faces, sports, well kept beer and excellent food. "></meta>

<meta name="keywords" content="earlsfield, southfields, beer, ale, London, pub, bar,  garden, sw18, wandsworth, friendly, traditional pub, food, youngs, atmosphere, local pub"></meta>

<!-- meta tags end -->


<!-- script JS -->

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js" type="text/javascript"></script>

  <script src="slides.jquery.js" type="text/javascript"></script>
      <script src="slides.min.jquery.js" type="text/javascript"></script>

<!-- script JS end -->   


<!-- favicon -->
<link rel="icon" href="images/favicon.ico" type="image/x-icon"></link>
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon"></link>
 <!-- end favicon -->

<!-- contact form ajax -->
<script language="javascript" type="text/javascript" >

$(function(){ 
    $("#ContactForm").submit(function(){
        $("#submitf").value='Please wait...';

        $.post("process.php?send=comments", $("#ContactForm").serialize(),
        function(data){
            if(data.frm_check == 'error'){ 

                    $("#message_post").html("&lt;div class='errorMessage'&gt;ERROR: " + data.msg + "!&lt;/div&gt; "); 
                    document.ContactForm.submitf.value='Resend >>';
                    document.ContactForm.submitf.disabled=false;
            } else {
                $("#message_post").html("&lt;div class='successMessage'&gt;Thank you. We'll be in touch shortly.&lt;/div&gt;"); 
                $("#submitf").value='Send >>';
                }
        }, "json");

        return false;

    });
});

</script>
<style type="text/css">

.errorMessage{color: #fff;background-color: #ce0c0c;padding: 5px;margin: 0px; width:350px;  opacity:0.6;
    filter:alpha(opacity=60);}
.successMessage{color: #fff;background-color: green;padding: 5px;margin: 0px; width:350px; opacity:0.6;
    filter:alpha(opacity=60); }


            h2 {
                margin: 25px 0 5px 0;
            }


            ul li { display: inline; }

            .wide {
                border-bottom: 1px #000 solid;
                width: 4000px;
            }

            .fleft { float: left; margin: 0 20px 0 0; }

            .cboth { clear: both; }

            #main {
                background: #fff;
                margin: 0 auto;
                padding: 30px;
                width: 1000px;
            }
        </style>
<!-- contact form ajax end -->

</head>

<body id="top">

<!-- scroll function -->

<script type="text/javascript">
    $(document).ready(function(){ 

        $(window).scroll(function(){
            if ($(this).scrollTop() > 100) {
                $('.scrollup').fadeIn();
            } else {
                $('.scrollup').fadeOut();
            }
        }); 

        $('.scrollup').click(function(){
            $("html, body").animate({ scrollTop: 0 }, 600);
            return false;
        });

    });
</script>

<a href="#" class="scrollup">Scroll</a>

<!-- scroll function end -->


<!-- image slides -->

 <script type="text/javascript">
        $(function(){
            $('#slides').slides({
                preload: true,
                preloadImage: 'loading.gif',
                play: 5000,
                pause: 2500,
                hoverPause: false,
              effect: 'fade',
              crossfade: true
            });
        });
    </script>

    <!-- image slides end -->


    <!-- top column, nav, logo -->

<div class="wrapper col1">
  <div id="header">
 <!-- top nav -->     
    <div id="topnav">
          <ul>
        <li><a href="contact_us.html">Contact Us</a><span>find us</span></li>
        <li><a href="gallery.html">Gallery</a><span>visit us</span>
            </li>
        <li><a href="#">Menus</a><span>food &amp; drink</span>
        <ul>
            <li><a href="menus.html">Drinks</a></li>
            <li><a href="food.html">Food</a></li>

          </ul>
          </li>
        <li class="active"><a href="index.html">Home</a><span>main page</span></li>
      </ul>
        </div>

         <!-- top nav -->

    <p class="imgholder"><img src="images/pig_logo.jpg" alt="The Pig &amp; Whistle logo" width="319" height="53" /></p>

  </div>
    <br class="clear" />
     <br />
</div>



  <!-- top column, nav, logo -->


    <!-- second column content -->

<div class="wrapper col2">
  <div id="intro">
    <div class="fl_left">
      <h1>WELCOME to The Pig and Whistle Pub!</h1>
      <p align="justify">Located within a short walking distance of Earlsfield, Southfields, Wimbledon Park and Wandsworth, the Pig and Whistle pub welcomes you with a warm, inviting and friendly atmosphere... <a href="#codeword">Discover More About Us &raquo;</a></p>
    </div>
    <div class="fl_right">
     <ul>
        <li><a href="#"><img src="images/piggyframe.png" alt="The Pig &amp; Whistle SW18" width="350" height="250" border="0" align="right"></img></a></li>
      </ul>
    </div>
    <br class="clear" />
  </div>
</div>

<!-- second column content -->

<!-- third column content -->

<div class="wrapper col3">
  <div id="latest">
    <ul>
      <li>
        <h2>Great Food</h2>
        <p class="imgholder"><img src="images/food.jpg" alt="Good Food"></img></p>
        <p align="justify">Whether you fancy a Light Lunch or something more wholesome our new menu has something for everyone to enjoy. <!--<a href="#">More &raquo;</a>--></p>
      </li>
      <li>
        <h2>Live Sport </h2>
        <p class="imgholder"><img src="images/footy.jpg" alt="Sports"></img></p>
        <p align="justify">With Sky Sports and ESPN we have all the live Premier League Football  for you to enjoy, as well as all the major sporting events.</p>
      </li>
      <li class="last">
        <h2>Beer Garden</h2>
        <p class="imgholder"><img src="images/garden.jpg" alt="Garden"></img></p>
        <p align="justify">Relax and enjoy summer evenings enjoying the fresh air in our new beer garden. Escape from the city and enjoy a nice cold pint! <!--<a href="#">More &raquo;</a>--></p>
      </li>
    </ul>
    <br class="clear" />
  </div>
</div>

<!-- Column -->

<div class="wrapper col4">
 <a name="codeword"> </a><div id="container">
    <div id="content">
      <h2>A little bit more about us:</h2>
      <p align="justify">
We have just taken over the tenancy of The Pig and Whistle-so you will see a couple of new faces, but we hope you feel just as welcome!
  Once an off licence, the Pig and Whistle is a great little pub with friendly faces, well kept beer and excellent food.

        <br />
  <br />

Despite more emphasis on food and lager, the young bar manager, Charlotte, take a pride in having the best traditional real ales to offer. It is part of Young &amp; Co’s Brewery pubs, a chain of respectable pubs scattered across the country. 


<br />
<br />

We hope you notice a few positive changes around the pub, from new furniture, refurbished toilets, a specials board and a few new products on the bar.
We know it is a great pub already and hope to make it even better.<br />

        <br />
        We do a quiz on a Monday Night from 8pm and have heated huts in the garden which you are able to reserve.

        <br />
        <br />
        Charlotte and her team will be looking after you as wonderfully as they have always done.
        <br />
       <br />

      Please come in and try it and any feedback is valued!!</p>
    </div>
    <div id="column">
      <div class="holder">
        <h2 class="title"><img src="images/quiz.jpg" alt=""></img>Quiz Night on Mondays</h2>
        <p align="justify">Monday Quiz Night  - &pound;1 entry. Starts at 20:00ish, so come early to grab your team a table. </p></div>

        <div class="holder2"><h2 class="title">Features</h2>
      <br />
        <dl>

                <dt><img src="images/icon-wifi.png" alt="Wifi Available"></img></dt>
                <dd>Wifi Available</dd>

                <dt><img src="images/icon-dogs.png" alt="Dogs Welcome"></img></dt>
                <dd>Dogs Welcome</dd>


                <dt><img src="images/icon-disabled.png" alt="Disabled Toilets"></img></dt>
                <dd>Disabled Toilets</dd>

                <dt><img src="images/icon-sports.png" alt="Matches Shown"></img></dt>
                <dd>Matches Shown</dd>

                <dt><img src="images/icon-ales.png" alt="Ales Available"></img></dt>
                <dd>Ales Available</dd>


                  <dt><img src="images/icon-outside.png" alt="Outside Tables"></img></dt>
                <dd>Outside Tables</dd>

                                <dt><img src="images/icon-quiz.png" alt="Ales Available"></img></dt>
                <dd>Quiz Night</dd>


                  <dt><img src="images/icon-fireplace.png" alt="Outside Tables"></img></dt>
                <dd>Fireplace</dd>



                <dt><img src="images/icon-food.png" alt="Food Served"></img></dt>
                <dd>Food Served</dd>


                <dt><img src="images/icon-cashback.png" alt="Cashback Available"></img></dt>
                <dd>Cashback Given</dd>






            </dl>
      </div>
    </div>
    <br class="clear" />

</div>
<div class="wrapper col5">
  <div id="footer">

  <!-- contact form in the footer -->

    <div id="contactform">
      <h2>Why Not Contact Us Today !</h2>
    <form action='' method='post' name='ContactForm' id='ContactForm' >
        <fieldset>
          <legend>Contact Form</legend>
          <label for="fullname">Name:
            <input id="fullname" name="uname" type="text" value="" />
          </label><br class="clear" />
          <label for="emailaddress" >Email:
            <input id="emailaddress" name="uemail" type="text" value="" />
          </label>
          <label for="telephone" class="margin">Telephone:<br />
            <input id="telephone" name="title" type="text" value="" />

          </label><br class="clear" />

          <label for="message">Message:
            <textarea id="message" name="message" cols="40" rows="9"></textarea>
          </label>

          <br class="clear" />
              <div id='message_post'></div>

          <p>
            <input id="submitf" name="submitf" type="submit" value="Submit" />
            &nbsp;
            <input id="reset" name="reset" type="reset" value="Reset" />
          </p>
        </fieldset>
      </form>
    </div>

    <!-- contact form in the footer end -->


<!-- footer -->

   <!-- business hours --> 
    <div class="fl_right">
      <div class="footbox">
      <h2>Opening Hours:</h2>

        <p>Mon - Sat:
         &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;<b style="float:right; width:130px;">12:00 - 00:00</b>
         <br />
         Sunday:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  <b style="float:right; width:130px;"> 09:00 - 22:30</b>

        </p>


       <div class="footbox address">

      <p><b>481 Merton Road 
        <br />Wandsworth
        <br />London - SW18 5LD
        <br />
        <a href="skype:+442088741061?call"><img src="images/skype.png" alt="Skype"></img></a>Phone:<a href="tel:020 8874 1061"> + 44 20 8874 1061</a></b></p>


      </div>
      </div>

      <div class="footbox last">
      <h2>Food Serving Hours:</h2>
         <p>Monday &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <b style="float:right; width:130px;">12:00 - 15:00</b>
         <br />
         to Friday:  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  <b style="float:right; width:130px;">18:00 - 22:00</b></p>
         <p>Saturday:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b style="float:right; width:130px;">12:00 - 22:00 </b></p>
         <p>Sunday:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b style="float:right; width:130px;">09:00 - 22:00 <br />
          </b>
         </p>
   </div>

   <!-- business hours -->

      <div class="footbox social"><iframe src="http://www.facebook.com/plugins/like.php?href=http://www.facebook.com/thepigandwhistlesw18"
        scrolling="no" frameborder="0"
        style="border: none; width: 285px; height: 80px;"></iframe></div>

      <div class="footbox social-fb"> 
      <a href="http://www.facebook.com/thepigandwhistlesw18"  target="_blank"><img src="images/facebook.png" alt="facebook page" ></img></a></div>
      <div class="footbox social-fb" ><a href="https://twitter.com/PigandWhistleSW" target="_blank"><img src="images/twitter.png" alt="twitter page" ></img></a> </div>
      <br class="clear" />
      <div class="footbox cloud"><a href="http://www.thecloud.net/free-wifi/"target="_blank"><img src="images/thecloud.png"  alt="the cloud page" ></img></a> </div>
      <br class="clear" />

      <div class="footbox tastecard"><a href="http://www.tastecard.co.uk/restaurant/details/7930/The-Pig-and-Whistle" target="_blank"><img src="images/tastecard.png" alt="tastecard page" ></img></a> </div>

      <br class="clear" />

      <div class="footbox youngs"><a href="http://www.youngs.co.uk/pub-detail.asp?PubID=309"target="_blank"><img src="images/youngs.png"  alt="young's" ></img></a> </div>
      <br class="clear" />

    </div>


    <br class="clear" />

  </div>

</div>

<div class="wrapper col6">
  <div id="copyright">
    <p class="fl_left">Copyright &copy; 2013 - All Rights Reserved - <a href="index.html">The Pig &amp; Whistle</a></p>
    <!-- bottom nav -->
    <div class="fl_right">
<a href="index.html">homepage |</a> 
<a href="menus.html">menus |</a>
<a href="gallery.html">gallery |</a>
<a href="contact_us.html">contact us</a></div>
    <br class="clear" />
  </div>
    <!-- bottom nav end-->

  <!-- end footer -->

</div>



</body>
</html>
4

1 回答 1

1

运行验证器指定您有一个div未关闭的标签。

复制上面的 HTML 错误是:

第 224 行,第 1 列:开始标签在这里

<div class="wrapper col4">

错误出现在那个div或其中的一个div项目上。

<div id="container">不像其他 div 那样缩进,所以这可能是您缺少的或者可能不需要的。

于 2013-04-30T10:25:05.617 回答