首先,我的问题可能不清楚。我会试着解释一下。
这是我的html
<div class="left"><?php print $search_box; ?><?php if (!empty($logo)): ?><a href="<?php print $base_path; ?>" title="<?php print t('Home'); ?>" rel="home"><img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" id="logo" width="243" height="62" /></a><?php endif; ?><?php if (!empty($site_name)): ?><div id='site-name'><strong><a href="<?php print $base_path; ?>" title="<?php print t('Home'); ?>" rel="home"><?php print $site_name; ?></a></strong></div><?php endif; ?><?php if (!empty($site_slogan)): ?><div id='site-slogan'><?php print $site_slogan; ?></div><?php endif; ?></div>
看起来丑陋且难以调试,对吧?
所以我尝试缩进并添加换行符。但是,它会在某些浏览器上失败,可能是 IE6。结果变了。那么,我应该怎么做,我应该使用其他文档类型吗?
目前,我正在使用
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">