伊谢尔伦2017-06-14 10:54:59
HTML (Hyper Text Mark-up Language), Hypertext Mark-up Language. Since it is a mark-up language, it must have a corresponding tag set.
There are many tags in HTML, and different tags have different functions. The style tag is used to define styles, the script tag is used to define scripts, the meta tag is used to define metadata, ul is used to define unordered lists, and ol is used to define Ordered lists and so on. The reason why the tag names are different is to have semantic meaning, that is, you can know what the tag name does when you look at it, which also facilitates the expansion of tags later in HTML.
So what are the ol and li mentioned here? In fact, they are HTML tags with different names, but they are essentially the same. In order to reflect the nested nature of tags, a tree structure is introduced to represent it, so that you can clearly know the relationship between tags. The subject here has a misunderstanding, that is, all nodes in the tree structure are elements and can be nested. Not only leaf nodes are elements, leaf nodes can also be expanded to produce child nodes. This is just for ease of representation and use. The program uses a tree structure for operation and processing.
phpcn_u15822017-06-14 10:54:59
It’s still an element. Anything defined by a tag can become an element. It’s just that the names are different depending on the nesting. For example, the two of them are both people according to the attribute definition.