How to use the neighboring sibling determiner in HTML
This article mainly introduces the HTML how to use the neighboring brother determiner related knowledge, the content is detailed and easy to understand, the operation is simple and fast, has a certain reference value, I believe that after reading this HTML how to use the neighboring brother determiner article will have a harvest, let's take a look.
Choose neighboring brothers
Suppose the requirement determines the element immediately after another element, and the two have mutually exclusive parent elements, and the neighboring sibling determiner (Adjacent sibling sele CTO r) can be used.
For example, suppose you want to add the top margin of a paragraph that appears immediately after the H2 element, or write something like this:
H2 + p {margin-top:50px;}
The selector reads: "choose the paragraph immediately after the H2 element, and the H2 and p elements have the same parent element."
This is the end of the article on "how HTML uses the neighboring sibling determiner". Thank you for reading! I believe you all have a certain understanding of "how HTML uses the neighboring brother determiner". If you want to learn more, you are welcome to follow the industry information channel.
Html, the full name of html, is a markup language that contains a series of tags. Through these tags, you can unify the format of documents on the network and connect scattered Internet resources into a logical whole. Html text is a descriptive text composed of html commands, and html commands can explain text, graphics, animation, sounds, tables, links, etc. Mainly used with css+js to build elegant front-end web pages.