From 310fd066e91f454b990372ffa30e803cc8120975 Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Thu, 11 Feb 2021 12:56:40 +0100 Subject: unslug zh-cn: move --- files/zh-cn/glossary/element/index.html | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 files/zh-cn/glossary/element/index.html (limited to 'files/zh-cn/glossary/element/index.html') diff --git a/files/zh-cn/glossary/element/index.html b/files/zh-cn/glossary/element/index.html new file mode 100644 index 0000000000..d199da5b07 --- /dev/null +++ b/files/zh-cn/glossary/element/index.html @@ -0,0 +1,22 @@ +--- +title: Element(元素) +slug: Glossary/元素 +tags: + - HTML + - XML + - 术语 + - 编程 +translation_of: Glossary/Element +--- +

元素是网页的一部分,在 {{glossary("XML")}} 和 {{glossary("HTML")}} 中,一个元素可以包含一个数据项,或是一块文本,或是一张照片,亦或是什么也不包含。 一个典型的元素包括一个具有一些{{glossary("attribute", "属性")}}的开始标签,中间的文本内容和一个结束标签。
+ Example: in <p class="nice">Hello world!</p>, '<p class="nice">' is an opening tag, 'class="nice"' is an attribute and its value, 'Hello world!' is enclosed text content, and '</p>' is a closing tag.

+ +

元素和{{glossary("tag", "标签")}}不是同一种概念。源代码中的标签用来标识元素的开始或结束,而元素是文档对象模型({{Glossary("DOM")}})中的一部分,文档对象模型会被{{glossary("browser", "浏览器")}}渲染、展示为页面。

+ +

相关信息

+ + -- cgit v1.2.3-54-g00ecf