Can the p tag and label tag be juxtaposed in html?

黄舟
Release: 2017-07-03 11:53:59
Original
4176 people have browsed it

Strictly speaking, can the p tag and label tag be juxtaposed? If we follow the principle that block elements are juxtaposed with block elements, and inline elements are juxtaposed with inline elements, it means they cannot be juxtaposed, right?

Are the only child elements that can be nested in the p tag only inline elements? Can span tags be nested inside span tags?

Please point out the nesting problem in my code, thank you

Don't stick to the rules of the HTML4 stage and experience based on the CSS level, it is of little significance. Strictly speaking, they can be paralleled. There is no nesting problem with your code either.

Block elements can contain inline elements or certain block elements, but inline elements cannot contain block elements. It can only contain other inline elements. 2. Block-level elements cannot be placed inside

There are several special block-level elements that can only contain inline elements and cannot contain block-level elements. These special tags are h1, h2, h3, h4, h5, h6, p, dt

Block-level elements are juxtaposed with block-level elements, and inline elements are juxtaposed with inline elements:

—— 对
—— 对

—— 错
Copy after login

The above is the detailed content of Can the p tag and label tag be juxtaposed in html?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!