A block element is generally a container element for other elements. Block elements generally start on a new line. It can accommodate inline elements and other block elements. A common block element is the paragraph tag 'P'. The block element "form" compares Extraordinary, it can only be used to hold other block elements. Without the help of CSS, block elements will be arranged one line at a time. With CSS, we can change the default layout mode of this HTML and place the block elements where you want. Instead of stupidly starting a new line every time. It should be pointed out that the table tag is also a type of block element. Table based layout and css based layout look at these two layouts from the perspective of ordinary users (excluding visually impaired people, blind people, etc.), except for page loading speed. Except for the difference, there is no other difference. But if an ordinary user inadvertently clicks the view page source code button, the difference between the two will be very large. The CSS layout page source code designed based on good reconstruction concepts can at least allow ordinary users without web development experience to quickly understand the content. From this perspective, css layout code should have a better aesthetic experience. You can think of the block container element div as boxes, or if you have played with clipping, it will be easier to understand. We first cut out the necessary articles from various newspapers and magazines. Each piece of cut content is a block. Then we glued these pieces of paper onto a new piece of blank paper according to our layout intention. This will form your own unique abstract. As an extension of the technology, web layout design follows the same pattern. Inline elements are generally based on basic elements at the semantic level. Inline elements can only hold text or other inline elements, and the common inline element "a" is. It should be noted that the Chinese name for inline element includes a variety of inline elements, inline elements, inline elements, and inline elements. Basically there is no unified translation, just call it whatever you want. In addition, when talking about inline elements, we will think of a display attribute called display:inline; this attribute can fix the famous IE double floating border problem. Block element (block element) and inline element (inline element) are concepts in the HTML specification. The basic difference between block elements and inline elements is that block elements generally start on a new line. When CSS control is added, this attribute difference between block elements and inline elements no longer becomes a difference. For example, we can add an attribute such as display:block to the inline element cite, so that it also has the attribute of starting from a new line every time. Variable elements are based on the above two and change with the environment. Its basic concept is that it needs to determine whether the element is a block element or an inline element based on the context. Variable elements still belong to the above two element categories. Once the context determines its category, it must follow the rules of block elements or inline elements. Block and inline classification details of html tags: block element div css xhtml xml Example Source Code Example Source Code inline element div css xhtml xml Example Source Code Example Source Code mutable elements div css xhtml xml Example Source Code Example Source Code
◎ address - address ◎ blockquote - block quote ◎ center - alignment block ◎ dir - directory list ◎ div - commonly used block level convenience, also the main tag of CSS layout ◎ dl - definition list ◎ fieldset - form control group ◎ form - interaction Form ◎ h1 - main title ◎ h2 - subtitle ◎ h3 - level 3 title ◎ h4 - Level 4 heading ◎ h5 - Level 5 heading ◎ h6 - Level 6 heading ◎ hr - Horizontal separator line ◎ isindex - input prompt
◎ menu - menu list ◎ noframes - frames optional content, (display this block content for browsers that do not support frames) ◎ noscript - optional script content (display this content for browsers that do not support script)
◎ ol - sorted form ◎ p - paragraph ◎ pre - formatted text ◎ table - table ◎ ul - unsorted list
◎ a - anchor point ◎ abbr - abbreviation ◎ acronym - initial letter ◎ b - bold (not recommended)
◎ bdo - bidi override
◎ big - large font ◎ br - line break ◎ cite - quote ◎ code - computer code (required when citing source code)
◎ dfn - define fields ◎ em - emphasize ◎ font - font settings (not recommended)
◎ i - italics ◎ img - picture ◎ input - input box ◎ kbd - define keyboard text ◎ label - table label ◎ q - short quote ◎ s - underline (not recommended)
◎ samp - define sample computer code ◎ select - item selection ◎ small - small font text ◎ span - commonly used inline container, define blocks within text ◎ strike - underline ◎ strong - bold emphasis ◎ sub - subscript ◎ sup - superscript ◎ textarea - multi-line text input box ◎ tt - telex text ◎ u - underline ◎ var - Define variables
A mutable element is a block element or an inline element depending on the context.
◎ applet-java applet
◎ button - button ◎ del - delete text ◎ iframe - inline frame
◎ ins - inserted text ◎ map - picture block (map)
◎ object - object object ◎ script - client script