This article mainly introduces the nesting rules of html tags. This article explains the nesting rules of block-level elements, embedded elements, and HTML tags. Friends who need it can refer to it.
There are many tags in XHTML: div, ul, li, dl, dt, dd, h1~h6, p, a, addresssa, span, strong... When we use these tags to build a page structure, we can nest them infinitely, but nesting also requires certain rules, and we cannot let our personal habits nest randomly. So, what are the rules for nesting html tags?
1. HTML tags include block-level elements and inline elements.1. Block-level elements
It is generally used to build a website architecture, layout, and host content...it includes the following tags:
Copy the code