翻译:Linyupark
You can prepare yourself for XHTML by starting to write strict HTML.
你可以开始通过书写严格的HTML代码来为你的XHML之行做好准备
--------------------------------------------------------------------------------
How To Get Ready For XHTML
如何为XHTML做准备呢?
XHTML is the next generation of HTML, but it will of course take some time before browsers and other software products are ready for it.
XHTML是HTML的下一代语言,但它将理所当然的在新的浏览器和其他的相关软件产品出现之前延迟一段时间才能普及。
In the meantime there are some important things you can do to prepare yourself for it. As you will learn from this tutorial, XHTML is not very different from HTML 4.01, so bringing your code up to 4.01 standards is a very good start. Our complete HTML 4.01 reference can help you with that.
其间,去做一些重要的事情来为它做准备。就像你可以从这教程学到东西一样,XHTML与HTML4.01相差不多,所以把你的代码改写成符合HTML4.01标准是一种非常好的开始,我们完整的HTML4.01参考可以帮助你解决这个问题。
In addition, you should start NOW to write your HTML code in lowercase letters, and NEVER make the bad habit of skipping end tags like the </p>.
另外,现在你应该开始用小写字母来书写你的HTML代码,并且永远不要再像以前那样有跳过像</p>这样的结尾标签的坏习惯。
Happy coding!
快乐的编码!
--------------------------------------------------------------------------------
The Most Important Differences:
非常重要的区别:
XHTML elements must be properly nested
XHTML元素必须合理嵌套
XHTML documents must be well-formed
XHTML文档必须格式正确
Tag names must be in lowercase
标签名称必须是小写
All XHTML elements must be closed
所有XHTML元素必须关闭
--------------------------------------------------------------------------------
Elements Must Be Properly Nested
元素必须合理嵌套
In HTML some elements can be improperly nested within each other like this:
在HTML中一些元素可以不使用正确的相互嵌套像这样:
<b><i>This text is bold and italic</b></i>In XHTML all elements must be properly nested within each other like this:
在XHTML所有元素必须合理的相互嵌套像这样:
<b><i>This text is bold and italic</i></b>Note: A common mistake in nested lists, is to forget that the inside list must be within a li element, like this:
注意:在列表嵌套的时候经常会犯一个错误,就是忘记了在列表中插入的新列表必须在一个<li>标记中,像这样:
<ul>
<li>Coffee</li>
<li>Tea
<ul>
<li>Black tea</li>
<li>Green tea</li>
</ul>
<li>Milk</li>
</ul>This is correct:
这才是正确的:
<ul>
<li>Coffee</li>
<li>Tea
<ul>
<li>Black tea</li>
<li>Green tea</li>
</ul>
</li>
<li>Milk</li>
</ul>Notice that we have inserted a </li> tag after the </ul> tag in the "correct" code example.
在这段正确的代码示例中,要注意在</ul>之后加了一个</li>标签
--------------------------------------------------------------------------------
Documents Must Be Well-formed
文档格式必须合格
All XHTML elements must be nested within the <html> root element. All other elements can have sub (children) elements. Sub elements must be in pairs and correctly nested within their parent element. The basic document structure is:
所有的XHTML标记必须被嵌套使用在<html> 根标签之中。所有其他的标签可以有自己的子标签。位于父标签之内的子标签也必须成对且正确的嵌套使用。一个网页的基本结构是:
<html>
<head> ... </head>
<body> ... </body>
</html>
--------------------------------------------------------------------------------
Tag Names Must Be In Lower Case
标签名称必须是小写
This is because XHTML documents are XML applications. XML is case-sensitive. Tags like <br> and <BR> are interpreted as different tags.
这是因为XHTML文档是XML应用程序,XML是区分大小写的,像<br>和<BR>会被认为是两种不同的标签。
This is wrong:
这是错误的:
<BODY>
<P>This is a paragraph</P>
</BODY>This is correct:
这是正确的:
<body>
<p>This is a paragraph</p>
</body>
--------------------------------------------------------------------------------
All XHTML Elements Must Be Closed
所有的XHTML元素必须关闭
Non-empty elements must have an end tag.
非空元素必须有关闭标签。
This is wrong:
这是错误的:
<p>This is a paragraph
<p>This is another paragraphThis is correct:
正确是这样:
<p>This is a paragraph</p>
<p>This is another paragraph</p>
--------------------------------------------------------------------------------
Empty Elements Must Also Be Closed
空的元素也必须关闭
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="/UploadFiles/2021-04-02/happy.gif">这是正确的:
This is a break<br />
Here comes a horizontal rule:<hr />Here''''s an image <img src="/UploadFiles/2021-04-02/happy.gif">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 />
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
《魔兽世界》大逃杀!60人新游玩模式《强袭风暴》3月21日上线
暴雪近日发布了《魔兽世界》10.2.6 更新内容,新游玩模式《强袭风暴》即将于3月21 日在亚服上线,届时玩家将前往阿拉希高地展开一场 60 人大逃杀对战。
艾泽拉斯的冒险者已经征服了艾泽拉斯的大地及遥远的彼岸。他们在对抗世界上最致命的敌人时展现出过人的手腕,并且成功阻止终结宇宙等级的威胁。当他们在为即将于《魔兽世界》资料片《地心之战》中来袭的萨拉塔斯势力做战斗准备时,他们还需要在熟悉的阿拉希高地面对一个全新的敌人──那就是彼此。在《巨龙崛起》10.2.6 更新的《强袭风暴》中,玩家将会进入一个全新的海盗主题大逃杀式限时活动,其中包含极高的风险和史诗级的奖励。
《强袭风暴》不是普通的战场,作为一个独立于主游戏之外的活动,玩家可以用大逃杀的风格来体验《魔兽世界》,不分职业、不分装备(除了你在赛局中捡到的),光是技巧和战略的强弱之分就能决定出谁才是能坚持到最后的赢家。本次活动将会开放单人和双人模式,玩家在加入海盗主题的预赛大厅区域前,可以从强袭风暴角色画面新增好友。游玩游戏将可以累计名望轨迹,《巨龙崛起》和《魔兽世界:巫妖王之怒 经典版》的玩家都可以获得奖励。