全部文章 | 论坛文集 | 网球 | hoopCHINA翻译团 | 论坛中的鼹鼠 | 生活中的鼹鼠 | 活/学到老 | 鼹鼠也看NBA

作者: 永进   发表日期: 2007-05-24 22:55   复制链接




Empty Elements Must Also Be Closed
空的元素也必须关闭

http://www.xhtml.net.cn/article_detail.asp?class=xhtml&id=152

Empty elements must either have an end tag or the start tag must end with />.
空的元素也必须有一个结束标签或者开始标签用/>结束。

This is wrong:
这是错误的:

This is a break<br>
Here comes a horizontal rule:<hr>
Here''s an image <img src="happy.gif" alt="Happy face">

This is correct:
这是正确的:

This is a break<br />

Here comes a horizontal rule:<hr />
Here''s an image <img src="happy.gif" alt="Happy face" />

IMPORTANT Compatibility Note:
注意兼容性的关键:

To make your XHTML compatible with today''s browsers, you should add an extra space before the "/" symbol like this: <br  />, and this: <hr  />. 
为了使你的XHTML能够兼容现在的浏览器,你必须在/符号之前加一个特殊的空格,就像这样:<br  />和这样:<hr  />

原来这个空格和斜杠是这样来的啊,还一直在迷惑一些后台代码不标准呢



返回永进的主页



 
    

原来这个空格和斜杠是这样来的啊 - 鼹鼠窝/hoopCHINA/NBA

作者: 永进   发表日期: 2007-05-24 22:55   复制链接




Empty Elements Must Also Be Closed
空的元素也必须关闭

http://www.xhtml.net.cn/article_detail.asp?class=xhtml&id=152

Empty elements must either have an end tag or the start tag must end with />.
空的元素也必须有一个结束标签或者开始标签用/>结束。

This is wrong:
这是错误的:

This is a break<br>
Here comes a horizontal rule:<hr>
Here''s an image <img src="happy.gif" alt="Happy face">

This is correct:
这是正确的:

This is a break<br />

Here comes a horizontal rule:<hr />
Here''s an image <img src="happy.gif" alt="Happy face" />

IMPORTANT Compatibility Note:
注意兼容性的关键:

To make your XHTML compatible with today''s browsers, you should add an extra space before the "/" symbol like this: <br  />, and this: <hr  />. 
为了使你的XHTML能够兼容现在的浏览器,你必须在/符号之前加一个特殊的空格,就像这样:<br  />和这样:<hr  />

原来这个空格和斜杠是这样来的啊,还一直在迷惑一些后台代码不标准呢