Common block-level elements and inline elements in CSS

According to the CSS specification, each web page element has a display property, which is used to determine the type of the element. Each element has a default display property value, such as a div element, whose default display property value is "block". Become a "block-level" element (block-level); the default display attribute value of the span element is "inline", which is called "inline" element. Block-level elements
such as div will automatically occupy a certain rectangular space, and the appearance of this rectangle can be adjusted by setting attributes such as height, width, and inner and outer margins; on the contrary, in-line elements such as "span" and "a" Element does not have its own independent space. It exists depending on other block-level elements. Therefore, it is invalid to set attributes such as height, width, inner and outer margins for inline elements.

Inline element (inline element) Inline element (inline element)

* a - anchor point
* abbr - abbreviation
* acronym - first word
* b - bold (not recommended)
* bdo - bidi override
* big - big font
* br - line break
* cite - citation
* code - computer code (in citing source code *
dfn - define field
* em - emphasis
* font - font setting (not recommended)
* i - italic
* img - image
* input - input box
* kbd - define keyboard text
* label - table label
* q - short reference
* s - dash (not recommended)
* samp - define example computer code
* select - item selection
* small - small font text
* span - common inline container, define block within text
* strike - dash
* strong - bold emphasis
* sub - subscript
* sup - superscript
* textarea - multi-line text input box
* tt - teletext
* u - underline
* var - define variable

block element

* address - address
* blockquote - block quote
* center - aligns blocks in the middle
* dir - directory list
* div - common block level is easy, but also the main label of css layout
* dl - definition list
* fieldset - form control group
* form - interactive Forms
* h1 - large headings
* h2 - subheadings
* h3 - 3-level headings
* h4 - 4-level headings
* h5 - 5-level headings
* h6 - 6-level headings
* hr - horizontal dividers
* isindex - input prompt
* menu - menu list
* noframes - optional content for frames, (show this block content for browsers that don't support frames
* noscript - ) optional script content (show this content for browsers that don't support script)
* ol - sort form
* p - paragraph
* pre - formatted text
* table - table
* ul - unsorted list

Variable Elements
A variable element is a block element or an inline element determined according to the context.

* applet - java applet
* button - 按钮
* del - 删除文本
* iframe - inline frame
* ins - 插入的文本
* map - 图片区块(map)
* object - object对象
* script - 客户端脚本

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326377635&siteId=291194637