验证问题
使用 w3c 验证器时出现以下错误,为什么?
Line 54, Column 9: No li element in list scope but a li end tag seen.
</li><!-- LI Close -->
代码
<!DOCTYPE html>
<html lang="en">
<head>
<title><?php echo $name; ?> : Nationwide Housemovers</title>
<link href="<?php echo base_url()?>includes/css/adminstyle.css" rel="stylesheet" type="text/css" media="screen" />
<link href='http://fonts.googleapis.com/css?family=Josefin+Slab' rel='stylesheet' type='text/css'>
<script type="text/javascript" src="<?php echo base_url() ?>includes/js/ckedit/ckeditor.js"></script>
</head>
<body>
<div id ="wrapper">
<div id="header">
<h1 id="companyName">Housemovers Ltd </h1>
<h4 id="companyQuote">""</h4>
</div>
<div id ="leftCol">
<nav>
<ul>
<?php if($this->session->userdata('logged_in')): ?>
<li><?php echo anchor('admin/dashboard', 'Dashboard');?></li>
<li><a>Edit Pages</a>
<?php if(is_array($cms_pages)): ?>
<ul>
<?php foreach($cms_pages as $page): ?>
<li><a href="<?=base_url();?>admin/editpage/index/<?= $page->id ?>/<?php echo url_title($page->name,'dash', TRUE); ?>"><?=$page->name?></a></li>
<?php endforeach; ?>
</ul> <!-- UL Close -->
<?php endif; ?>
</li> <!-- Edit Close -->
<li><a>Gallery</a>
<ul>
<li><?php echo anchor('admin/addimage','Add Image');?></li>
<li><?php echo anchor('admin/deleteimage','Delete Image');?></li>
</ul>
</li> <!-- Gallery Close -->
<li><a>Sales</a>
<ul>
<li><?php echo anchor('admin/addsale','Add Sale');?></li>
<li><a>Edit Sale</a>
<?php if(is_array($sales_pages)): ?>
<ul>
<?php foreach($sales_pages as $sale): ?>
<li><a href="<?=base_url();?>admin/editsale/index/<?= $sale->id ?>/<?php echo url_title($sale->name,'dash', TRUE); ?>"><?=$sale->name?></a></li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</li><!-- LI Edit Sale Close -->
</li><!-- LI Close -->
<li><?php echo anchor('#','Delete Sale');?></li>
</ul><!-- UL Close -->
<li><?php echo anchor('admin/home/logout','Log Out');?></li>
<?php else: ?>
<?php redirect('admin/home'); ?>
<?php endif; ?>
</ul>
</nav>
</div><!--leftCol End -->
<section id="content">
<?=$content?>
</section>
<footer>
<p>© Houses LTD <?php echo date('Y');?></p>
</footer>
</div>
</body>
</html>
I get the following error when using the w3c validator why?
Line 54, Column 9: No li element in list scope but a li end tag seen.
</li><!-- LI Close -->
Code
<!DOCTYPE html>
<html lang="en">
<head>
<title><?php echo $name; ?> : Nationwide Housemovers</title>
<link href="<?php echo base_url()?>includes/css/adminstyle.css" rel="stylesheet" type="text/css" media="screen" />
<link href='http://fonts.googleapis.com/css?family=Josefin+Slab' rel='stylesheet' type='text/css'>
<script type="text/javascript" src="<?php echo base_url() ?>includes/js/ckedit/ckeditor.js"></script>
</head>
<body>
<div id ="wrapper">
<div id="header">
<h1 id="companyName">Housemovers Ltd </h1>
<h4 id="companyQuote">""</h4>
</div>
<div id ="leftCol">
<nav>
<ul>
<?php if($this->session->userdata('logged_in')): ?>
<li><?php echo anchor('admin/dashboard', 'Dashboard');?></li>
<li><a>Edit Pages</a>
<?php if(is_array($cms_pages)): ?>
<ul>
<?php foreach($cms_pages as $page): ?>
<li><a href="<?=base_url();?>admin/editpage/index/<?= $page->id ?>/<?php echo url_title($page->name,'dash', TRUE); ?>"><?=$page->name?></a></li>
<?php endforeach; ?>
</ul> <!-- UL Close -->
<?php endif; ?>
</li> <!-- Edit Close -->
<li><a>Gallery</a>
<ul>
<li><?php echo anchor('admin/addimage','Add Image');?></li>
<li><?php echo anchor('admin/deleteimage','Delete Image');?></li>
</ul>
</li> <!-- Gallery Close -->
<li><a>Sales</a>
<ul>
<li><?php echo anchor('admin/addsale','Add Sale');?></li>
<li><a>Edit Sale</a>
<?php if(is_array($sales_pages)): ?>
<ul>
<?php foreach($sales_pages as $sale): ?>
<li><a href="<?=base_url();?>admin/editsale/index/<?= $sale->id ?>/<?php echo url_title($sale->name,'dash', TRUE); ?>"><?=$sale->name?></a></li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</li><!-- LI Edit Sale Close -->
</li><!-- LI Close -->
<li><?php echo anchor('#','Delete Sale');?></li>
</ul><!-- UL Close -->
<li><?php echo anchor('admin/home/logout','Log Out');?></li>
<?php else: ?>
<?php redirect('admin/home'); ?>
<?php endif; ?>
</ul>
</nav>
</div><!--leftCol End -->
<section id="content">
<?=$content?>
</section>
<footer>
<p>© Houses LTD <?php echo date('Y');?></p>
</footer>
</div>
</body>
</html>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
还有一个额外的
There's an extra
</li>