What are the tag nesting rules in css

王林
Release: 2020-07-08 17:00:13
forward
3218 people have browsed it

What are the tag nesting rules in css

Introduction to nesting rules:

(Recommended tutorial: css quick start)

1. The body can directly contain blocks Shape elements, ins, del, script, etc. cannot directly contain inline elements;

2, ins and del (inline elements) can contain block elements or inline elements, and any other inline elements are not allowed to contain block elements. Elements;

3, p, h1-h6 can directly contain inline elements and text information, but block elements are not allowed;

4, dl elements are only allowed to contain dt and dd, and at the same time dt cannot contain block elements, only inline elements are allowed, and dd can contain any element;

5. The form element cannot directly contain input elements. The reason is that the input element is an inline element, and the form element can only contain block elements;

6. The table element can only contain caption, colgroup, col, thead, tbody, tfoot, and cannot directly contain tr or anything else. element;

The above is the detailed content of What are the tag nesting rules in css. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template