In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article shows you which two kinds of html tags are divided into, the content is concise and easy to understand, it will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
Recommended tutorial: Html tutorial
Generally speaking, inline elements are divided into inline elements and block elements. inline elements mean, for example, if two inline elements are on the same line, they will not branch, for example, they do not support the attributes of width and height, so the height and width of the inline element is only the height and width of its content. Block, if two block elements can no longer be on the same line, it means that they will wrap, for example
... Etc., but block elements support the attributes of width and height, while inline elements do not, of course, you can change the inline to block or block to inline through css.
1. Inline element
The most common use of inline elements is span, others are only used in specific functions, decorating fonts and tags, and these two tags can directly make a squared effect without the help of similar moving attributes.
Characteristics of inline elements: (1) setting width and height is invalid
(2) for margin, only the left and right directions are valid, and the upper and lower directions are not valid; the padding setting is valid for both left and right directions, that is, it will enlarge the space.
(3) Line wrapping will not be done automatically.
Test case span {width: 120px; height: 120px; margin: 1000px 20px; padding: 50px 40px; background: lightblue;} does not automatically wrap line elements
Effect picture
two。 Massive element
Block elements are representative of div, while others, such as p, nav, aside, header, footer, section, article, ul-li, address, and so on, can be implemented with div. However, in order to facilitate programmers to interpret the code, specific semantic tags are generally used to make the code readable and easy to check for errors.
Characteristics of massive elements: (1) be able to identify width and height
(2) the upper and lower sides of margin and padding are effective for it.
(3) automatic line wrapping
(4) multiple block element tags are written together, and the default arrangement is from top to bottom.
Test case div {width: 120px; height: 120px; margin: 50px 50px; padding: 50px 40px; background: lightblue } automatic line wrapping block elements which two kinds of html tags are included in the above contents? have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.