0

我只是在学习 xhtml,我们的老师想要在我们的段落标签之间引用这个引用:

"Definition lists are lists of terms and their definitions. They are a little different than ordered and unordered lists in that the items are listed in pairs. The dl and dl surround the list. The name of the term appears between dt and dt, and the definition is between dd and dd."

但是当我放入标签时,我的输出看起来像下面的输出。我怎样才能把 <> 放在周围而不让它解释为定义标签?

"Definition lists are lists of terms and their definitions. They are a little different than ordered and unordered lists in that the items are listed in pairs. The <dl> and </dl> surround the list. The name of the term appears between<dt> and </dt>, and the definition is between <dd> and </dd>."

4

2 回答 2

1

尝试这个:

"定义列表是术语及其定义的列表。它们与有序列表和无序列表有一点不同,因为它们是成对列出的。<dl> 和 <dl> 包围列表。术语的名称出现在 < dt> 和 <dt>,定义在 <dd> 和 <dd> 之间。”

于 2013-02-06T11:20:44.597 回答
1

如您所知,字符<>&在 (X)HTML 中具有特殊含义。您可以(并且应该)分别通过编写&lt;&gt;和来逃避它们&amp;

另请参阅这篇文章,“何时使用转义”部分。

于 2013-02-05T11:15:31.283 回答