【发布时间】:2011-06-07 06:20:18
【问题描述】:
在<span>foo</span> 中引用foo 的正确术语是什么?
【问题讨论】:
标签: html xml terminology
在<span>foo</span> 中引用foo 的正确术语是什么?
【问题讨论】:
标签: html xml terminology
定义:之间的文字 开始标签和结束标签称为 元素的内容
【讨论】:
对我来说取决于上下文。
在 Javascript 中,它将是 innerHTML 属性。
在 HTML 中它只是内容:
<span> 是开始标签
foo 是内容
</span> 是结束标签
【讨论】:
引自 w3schools
An XML element is everything from (including) the element's start tag to
(including) the element's end tag.
An element can contain other elements, simple text or a mixture of both.
Elements can also have attributes.
<bookstore>
<book category="CHILDREN">
<title>Harry Potter</title>
<author>J K. Rowling</author>
<year>2005</year>
<price>29.99</price>
</book>
<book category="WEB">
<title>Learning XML</title>
<author>Erik T. Ray</author>
<year>2003</year>
<price>39.95</price>
</book>
</bookstore>
In the example above, <bookstore> and <book> have element
contents, because they contain other elements. <author> has
text content because it contains text.
所以,“文本内容”
【讨论】:
我将其称为“内容”或“文本”。
鉴于 HTML 作为一种标记语言,您也可以将其称为“所描述的”。
【讨论】:
我个人称之为内容或文字
span中的内容是foo
这听起来是正确的 IMO。
【讨论】:
<span>元素的文本子节点的内容。
请参阅quirksmode:
如果你这样做了
<P>This is a paragraph</P>您已经创建了两个节点:一个元素 P 和一个内容为“这是一个段落”的文本节点。文本节点位于元素内部,因此被视为元素的子节点。
【讨论】: