Hi Everyone…please help me with this. I will always be a newbie to the programming world. I am not sure why my page won’t validate here. The validator gives me an error " line 82 column 6 - Error: end tag for “DIV” omitted, but its declaration does not permit this" - this shows </body> tag and it says “line 16 - Info: start tag was here” which is "<div class="wrapper">". Any help is appreciated… thank you.
Here is my HTML…
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<head>
<base href="/viewgallery.php" >
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Galleries-Colorado Journeys- Photography</title>
<link rel="stylesheet" type="text/css" href="/stylees.css" >
<meta name="author" content="by Photography." >
<meta name="dcterms.rights" content="All rights reserved by Photography.">
<meta name="keywords" content=" Colorado Journeys-Gallery by Photography, Landscapes, Colorado, images, India, U.S.A" >
<meta name="description" content="These are images from my small trips to different parts of Colorado. This is an amazing state and images here bring together so many wonderful memories." >
<link rel="image_src" href= "http://www.newlight.com/photos/" >
<link rel="icon" type="image/ico" href="http://www.newlight.com/favicon.ico" >
</head>
<body>
<div class="wrapper">
<h1 id="header1"><a href="/viewgallery.php"><span><!-- --></span></a></h1>
<div class="main">
<ul class="nav">
<li><a href="/index.php">HOME |</a></li>
<li><a href="/viewgallery.php">MY GALLERIES |</a></li>
<li><a href="/searchmyway.php">SEARCH |</a></li>
<li><a href="/aboutme.php">ABOUT ME</a></li>
</ul><div class='thumbsPage'><div class='link'><a href="/viewgallery.php">Albums</a>
<span class='arrow'>>></span><a href="/viewgallery.php?cname=Colorado-Journeys">Colorado Journeys</a><br><br></div>
<div class='des'>These are images from my small trips to different parts of Colorado. This is an amazing state and images here bring together so many wonderful memories.<br><br></div><div class='thumbs'><table><tr>
<td><a href="/viewgallery.php?cname=Colorado-Journeys&pcaption=5RETRETERTYRWE"><img src='/./photos/tb_995170_564860166884134_1154534997_n.jpg' alt='5RETRETERTYRWE' ></a></td>
<td><a href="/viewgallery.php?cname=Colorado-Journeys&pcaption=RYEWYETUYTUWERY"><img src='/./photos/tb_4278823658368000030.jpg' alt='RYEWYETUYTUWERY' ></a></td>
</tr>
<tr>
<td><a href="/viewgallery.php?cname=Colorado-Journeys&pcaption=REYTUYIEYRIY-RWY-RWEYREY"><img src='/./photos/tb_Selene_by_Karezoid.jpg' alt='REYTUYIEYRIY-RWY-RWEYREY' ></a></td>
<td><a href="/viewgallery.php?cname=Colorado-Journeys&pcaption=TRETERW-RY-REWYREWY"><img src='/./photos/tb_JF-0002_700px.jpg' alt='TRETERW-RY-REWYREWY' ></a></td>
</tr></table></div></div>
</div>
<div class="footer">
<div class="facebook">
<ul>
<li>
<!-- AddToAny BEGIN -->
<div class="a2a_kit a2a_kit_size_22 a2a_default_style">
<a class="a2a_button_facebook"></a> <a class="a2a_button_twitter"></a>
<a class="a2a_button_google_plus"></a> <a class="a2a_button_stumbleupon"></a>
<a class="a2a_button_pinterest"></a> <a class="a2a_dd" href=
"http://www.addtoany.com/share_save"></a>
</div>
<div class="footinner">
<div id="seeker">
<form action="/searchmyway.php" method="get">
<p><input type="text" name="q" id="search" ></p><p><input type="submit" id="find"
value="Search" ></p><p><input type="hidden" name="form_id:search" value="1" ></p>
</form>
</div>
</div>
<p class="footnote"></p>
</li>
</ul>
</div>
</div>
</body>
</html>
Good to see you here again Ralphm( you have helped me in the past ) … I am not sure why that validated ( thought that’s what I want ) But I edited the post with the code that gives me the error. I am using http://validator.w3.org/check…
Hi Everyone again… hanks for helping me with this. I tried…adding closing tags <!-- xyz --> And removed some elements like Facebook, Google Analytic etc to make sense of HTML div tags. But I think I created a monster in the process. Here is the cleaner code, but the problem still persists… the errors now are
Result: 2 errors / 0 warnings
line 46 column 5 - Error: end tag for element "DIV" which is not open
line 62 column 7 - Error: end tag for element "DIV" which is not open
But they clearly are open…which are the “mai” and “wrapper” DIVS
You just have extra </div>'s .
Why do you have a closing div tag for “nav” even though the nav element is a UL? Remove pairs of DIVs until you are left with the extra(s)
This is actually the closing div for the wrapper. This one is actually closing a non existent div tag; The other extra </div> tag therefore come before this.
Thank you guys… your help eliminated one error The error that shows is line 46 column 5 - Error: end tag for element "DIV" which is not open which is about the ‘main’ DIV.
Thanks guys… this problem was partially because my PHP code was outputting HTML tags ( old code …now I know this is bad practice…), this is now fixed. Thank you for helping me, you guys are awesome!.