XHTML校验中的常见错误

| No Comments | No TrackBacks

最近用XHTML 1.0和CSS做一个网站程序。
今天编写一段网页,进行XHTML校验,出现了十几个个错误,排错后,有六个错误始终不知如何改正,是关于JAVASCRIPT的。
Google一下,Common XHTML Validation Errors这篇文章,出现在我眼前。

其实问题就是:

Unescaped Ampersand ("&")


Example:

<a href="foo.cgi?chapter=1&section=2">...</a>


Possible Validator Report: Unknown entity...


Solution: Always use &amp; in place of &.


Correct Syntax:

<a href="foo.cgi?chapter=1&amp;section=2">...</a>

我把一个&改成&amp;之后,再校验,六个错误一起消失。


作者: David Yin
原载: FreeThinking
版权所有。转载时必须以链接形式注明作者和及本声明。

No TrackBacks

TrackBack URL: http://www.yinfor.com/mtcgi/mt-tb-0822.cgi/605

Leave a comment

About this Entry

This page contains a single entry by David Yin published on 2005年4月13日 16:13.

結婚到底好不好? was the previous entry in this blog.

Google's Map Service is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Archives

Online Tools

Code Convertor
GeoURL
Listed on BlogShares