Markup Validation Error Cleanup “the <FOO> error
-
when i look at the validator results for my site: https://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.goldcoastchamber.com%2Fwordpress%2F, i see a ton of mentions similar to the following:
<meta name="language" content="en" /> ? The sequence <FOO /> can be interpreted in at least two different ways, depending on the DOCTYPE of the document. For HTML 4.01 Strict, the '/' terminates the tag <FOO (with an implied '>'). However, since many browsers don't interpret it this way, even in the presence of an HTML 4.01 Strict DOCTYPE, it is best to avoid it completely in pure HTML documents and reserve its use solely for those written in XHTML.
how do i clean these up? is it as simple as changing
content="en" />' to
content=”en”/>’thanks!
-
It’s just a mistake in your header.php in your theme. The top lines should be this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="https://www.w3.org/1999/xhtml" dir="ltr" lang="en-US"> <head profile="https://gmpg.org/xfn/11">
so delete the
<div id="outer_wrapper">
that’s at the very top.Then check validation again. Should fix everything.
on what page of my theme files should my outer wrapper go??? i originally added it into the header.php file so i could control the borders around the middle section. again, i’m a newbie so i dont really know the right place for it. thanks.
It looks like a dup tag from just below your
<body>
tag , so delete it the see what the page looks like and revalidate. If you added it to fix things, chances are there are more code errors. Did you edit the theme you’re using?hmmm. well i took it out of my header.php file but now all the alingment is screwed up.
meanwhile i have a
<div id="outer_wrapper">
surrounding all the code in my single.php, page.php and index.php files. do i need to make some sort of adjustment there????actually below is my entire header.php code. should i put
<div id="outer_wrapper">
just below<body>
? if so, where do i put the</div>
, because there’s no</body>
on this page??? i’m confused. ??<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="https://www.w3.org/1999/xhtml" dir="ltr" lang="en-US"> <head profile="https://gmpg.org/xfn/11"> <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" /> <meta name="distribution" content="global" /> <meta name="language" content="en" /> <link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_url'); ?>" /> <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" /> <link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" /> <link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" /> <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" /> <title><?php bloginfo('name'); wp_title(); ?></title> <?php wp_head(); ?> </head> <body> <img id="frontphoto" src="<?php bloginfo('template_directory'); ?>/img/front.jpg" alt="" /> <div id="leftside"> <?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar('Main Sidebar') ) : else : ?> <h2 class="hide">Main menu:</h2> <ul class="page"> <?php if (is_page()) { $highlight = "page_item"; } else {$highlight = "page_item current_page_item"; } ?> <li class="<?php echo $highlight; ?>"><a href="<?php bloginfo('url'); ?>">Home</a></li> <?php wp_list_pages('exclude=19&sort_column=menu_order&depth=1&title_li='); ?> </ul> <?php endif; ?>
Try placing just after
<body>
.Distracted by phone call…
header.php loads by
<?php get_header(); ?>
in all your theme files, like index.php, page.php, single.php, etc., so that one file – header.php – gets included in index.php, etc. If you look in index.php, etc., you’ll see<?php get_header(); ?>
at the top.So if you take that extra
<div id="outer_wrapper">
out of header.php, it doesn’t load in all the other files.But I can see from page source that it’s still missing in your theme files. Did you edit them? Get a fresh copy of your theme and find out where
<div id="outer_wrapper">
goes, or try putting<div id="outer_wrapper">
right below<body>
in header.php.thanks for bearing with me!!!!
so if i understand correctly,
<div id="outer_wrapper">
should go at the end of my header, after<body>
. And just in header.php, nowhere else.but then the
</div>
to close the wrapper should go where?You’ll need to try and figure out where it nests. Do you have a unedited copy of your theme? You really need to try and find one. If so, you can look at the unedited files.
Failing that, try this at the bottom of your footer.php:
? 2009 Gold Coast Chamber of Commerce<br /> Designed by <a href="https://www.adfgadfgadfg.com" target="blank">adfgadfgadfg.com</a></div> </div></div> </body> </html>
hmmm. seems to be getting worse.
here’s what i have right now in my header.php (including the start of the wrappers below the start of the body):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="https://www.w3.org/1999/xhtml" dir="ltr" lang="en-US"> <head profile="https://gmpg.org/xfn/11"> <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" /> <meta name="distribution" content="global" /> <meta name="language" content="en" /> <link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_url'); ?>" /> <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" /> <link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" /> <link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" /> <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" /> <title><?php bloginfo('name'); wp_title(); ?></title> <?php wp_head(); ?> </head> <body> <div id="outer_wrapper"> <div id="wrap"> <img id="frontphoto" src="<?php bloginfo('template_directory'); ?>/img/front.jpg" alt="" /> <div id="leftside"> <?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar('Main Sidebar') ) : else : ?> <h2 class="hide">Main menu:</h2> <ul class="page"> <?php if (is_page()) { $highlight = "page_item"; } else {$highlight = "page_item current_page_item"; } ?> <li class="<?php echo $highlight; ?>"><a href="<?php bloginfo('url'); ?>">Home</a></li> <?php wp_list_pages('exclude=19&sort_column=menu_order&depth=1&title_li='); ?> </ul> <?php endif; ?>
here’s what i have in my footer.php:
<?php eval(base64_decode('Pz4gPGRpdiBpZD0iZm9vdGVyIj4NCjxwPjxzcGFuIGNsYXNzPSJjcmVkaXRzIj4mY29weTsgPD9waHAgZWNobyBkYXRlKCdZJyk7ID8+IDxhIGhyZWY9Ijw/cGhwIGJsb2dpbmZvKCdob21lJyk7ID8+Ij48P3BocCBibG9naW5mbygnbmFtZScpOyA/PjwvYT4uIDxhIGhyZWY9Imh0dHA6Ly9kdmR0b2lwb2Rwcm8uY29tLyI+RFZEIHRvIGlQb2QgY29udmVydGVyPC9hPi4gPGEgaHJlZj0iaHR0cDovL2Jlc3RsYXB0b3BzNHUuY29tLyI+QmVzdCBsYXB0b3BzPC9hPi4gPGEgaHJlZj0iaHR0cDovL3d3dy5hbnRpdmlydXMtaW5mby1vbmxpbmUuY29tLyI+QW50aXZpcnVzIHNvZnR3YXJlPC9hPjwvcD4NCjxwPjxhIGhyZWY9Ijw/cGhwIGJsb2dpbmZvKCdyc3MyX3VybCcpOyA/PiI+RW50cmllcyAoUlNTKTwvYT4gLSA8YSBocmVmPSI8P3BocCBibG9naW5mbygnY29tbWVudHNfcnNzMl91cmwnKTsgPz4iPkNvbW1lbnRzIChSU1MpPC9hPiAtIDw/cGhwIHdwX2xvZ2lub3V0KCk7ID8+PC9zcGFuPjxiciAvPjwvcD4NCjwvZGl2Pg0KPD9waHAgZG9fYWN0aW9uKCd3cF9mb290ZXInKTsgPz4NCjwvZGl2Pg0KPC9ib2R5Pg0KPC9odG1sPiA8Pw=='));?> <div id="footer"> <h5>The GCCC is a not-for-profit 501(c) (6) non-government membership organization. Member of CIANJ, Member ICC, affiliated with<br /> NJAWBO Bergen Chapter, affiliated with Bergen Community College small business development center.</h5><br /> ? 2009 Gold Coast Chamber of Commerce<br /> Designed by <a href="https://www.adfgadfgadfg.com" target="blank">adfgadfgadfg.com</a></div> </div></div> </body> </html>
and i removed all mentions of the wrapper and footer from index.php, page.php and single.php
now the alignment of everything is way way off. please advise how to fix. thanks!
and i removed all mentions of the wrapper and footer from index.php, page.php and single.php
I didn’t tell you to do that. Why did you do that? Put them back. That’s why the layout is all screwed up now.
The code in your footer.php brings up another issue: the base64 code is encoded crap links to the theme designer. I decoded them, but if you can’t get this theme to work with little more work, ditch it and get a good theme that isn’t encrypted. This is the only code that should be in footer.php:
<div id="footer"> <h5>The GCCC is a not-for-profit 501(c) (6) non-government membership organization. Member of CIANJ, Member ICC, affiliated with<br /> NJAWBO Bergen Chapter, affiliated with Bergen Community College small business development center.</h5><br /> ? 2009 Gold Coast Chamber of Commerce<br /> Designed by <a href="https://www.adfgadfgadfg.com" target="blank">adfgadfgadfg.com</a></div> <p><span class="credits">? <?php echo date('Y'); ?> <a href="<?php bloginfo('home'); ?>"><?php bloginfo('name'); ?></a></p> <p><a href="<?php bloginfo('rss2_url'); ?>">Entries (RSS)</a> - <a href="<?php bloginfo('comments_rss2_url'); ?>">Comments (RSS)</a></span><br /></p> </div> <?php do_action('wp_footer'); ?> </div> </body> </html>
again, thanks for bearing with me. i’ve got a lot to learn here.
so i used the code you provided and made that the only thing in footer.php.
also (not sure if i correctly interpreted your instructions on this step) but i also, put back all the footer mentions i previously had into the bottom of index.php, page.php and single.php. that code is as follows:
<div id="footer"> <h5>The GCCC is a not-for-profit 501(c) (6) non-government membership organization. Member of CIANJ, Member ICC, affiliated with<br /> NJAWBO Bergen Chapter, affiliated with Bergen Community College small business development center.</h5><br /> ? 2009 Gold Coast Chamber of Commerce<br /> Designed by <a href="https://www.adfgadfgadfg.com" target="blank">adfgadfgadfg.com</a></div> </div><!-- end outer_wrapper div-->
however, i feel like this is not what should be there, instead, perhpas some php script that calls the footer.php file? if so, what does that script look like?
Also (sorry, throwing a lot here at you), where exactly should I put
<div id="outer_wrapper"> <div id="wrap">
and their respective closing divs (
</div>
)?thanks!!!!!!!
eval(base64_decode(
I wouldn’t recommend using any theme with this crap in it.
why not? i’ve spent a lot of time customizing this theme. the last thing i want to do is abandon it.
please please please help
- The topic ‘Markup Validation Error Cleanup “the <FOO> error’ is closed to new replies.