-1

I get 2 errors involving body and html saying I may have neglected to close an element? Line 5 column 146.

<!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" lang="en" xml:lang="en"> <head> <title>Joe Gas</title> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> <link rel="stylesheet" type="text/css" href="css/screen.css" media="screen" /> </head> <body> <div id="wrapper"/>   <div id="header">     <div id="logo">       <h1><a href="#">Edward<span> F.</span>Westfield</a></h1> 
    </div>     <div class="clr"></div>   </div>   <div class="content">     <ul id="menu">       <li><a class="current" href="#">Home</a></li>       <li><a href="#">Practice</a></li>       <li><a href="#">Attorneys</a></li> 
      <li><a href="#">About Us</a></li>       <li><a href="#">Contact Us</a></li>     </ul>     <div id="pitch">       <h1>Professionalism and a pursuit of excellence.<br />         </h1>  <p></p> 
         </div>     <div class="col">       <h2>Attorneys</h2>       <p></p>       <a class="link" href="#">MORE</a> </div>    <div class="col">       <h2>About Us</h2> 
      <p></p>       <a class="link" href="#">MORE</a> </div>     <div class="clr"></div>   </div>   <div id="main"/>     <div class="col"/> 
7
Contributors
8
Replies
62
Views
4 Years
Discussion Span
Last Post by hapiscrap
0

The last div element should not be expressed as a singleton type element.

  <div class="col"/> 
0

If you like things in XHTML like lowercase and closing all of your tags, I'd also recommend moving towards HTML5. Once you use the HTML doctype as posted by Dani, you dont necessarily have to use the newer HTML5 elements right away.

Just make sure you aren't still using deprecated elements and/or attributes.

Here's an example of a web page that will validate as HTML5:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <title>Example document</title>
  </head>
  <body>
    <p>Example paragraph</p>
  </body>
</html>
-1

because: it looks like they've been asked to make changes to existing code for a web site. the poster being unversed in coding xhtml, and not wanting to make changes outside of what was asked

the OP asked for what may seem redundant questions, for an outdated language version.
I still have code in html4, no need to change them they function as required
some pages in xhtml, ditto
some pages in html5 playing with function, that dont work on my POS terminals since the embedded OS has IE7 (and its ugly)
just saying, cut em some slack

Edited by almostbob

0

Thank you all so much....almostbob nailed it (I'm changing existing code on web site)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.