


Block element block element and inline element inline element_CSS/HTML
An attempt was made to insert a block-level element into an inline-level element. This is not allowed. The only exception to the possibility of inserting block-level elements into inline elements is the object tag. So what are inline-level elements and block-level elements? .
Block elements are generally container elements 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 "form" block element is special. It can only be used to accommodate other block elements.
Without the function of css, the block elements will be arranged one row at a time. After using 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 block element. First, from the perspective of ordinary users (excluding visually impaired people, blind people, etc.), there is no other difference between table based layout and css based layout except for the difference in page loading speed. But if it is ordinary. After the user inadvertently clicks the view page source code button, the difference between the two is 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 view the content. Quickly understand. From this perspective, CSS layout code should have a better aesthetic experience.
You can imagine the block container element div as a box, or if you have played with clipping. If so, it will be easier to understand. We first cut out the required articles from various newspapers and magazines. The content of each cut is a block, and then we use glue to rearrange these pieces of paper according to our own layout intention. Paste onto a new blank piece of paper. This creates your own unique digest. As an extension of the technique, web layout design also follows the same pattern.
Inline elements ( Inline elements are generally based on basic elements at the semantic level. Inline elements can only accommodate text or other inline elements. The common inline element "a".
Block element and inline element are both 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.
The basic concept of a variable element 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. See full text for rough element classification.
ps: Regarding the Chinese name of inline element, there are many kinds 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
* address - address
* blockquote - block quote
* center - alignment block
* dir - directory list
* div - Commonly used block levels are easy and are also the main tags of css layout
* dl - Definition list
* fieldset - form control group
* form - Interactive form
* h1 - Big title
* h2 - Subtitle
* h3 - Level 3 title
* h4 - Level 4 title
* h5 - Level 5 title
* h6 - Level 6 title
* hr - Horizontal dividing line
* isindex - input prompt
* menu - menu list
* noframes - frames optional content, (for browsers that do not support frames, display this block content
* noscript -) optional script content (for browsers that do not support frames) Browsers that do not support script will display this content)
* ol - sorted form
* p - paragraph
* pre - formatted text
* table - table
* ul - unsorted list
Inline element
* a - Anchor point
* abbr - Abbreviation
* acronym - First word
* b - Bold (not recommended)
* bdo - bidi override
* big - big font
* br - line break
* cite - quotation
* code - computer code (required when citing source code)
* dfn - Define field
* em - Emphasis
* font - Font setting (not recommended)
* i - Italic
* img - Picture
* input - Input box
* kbd - Define keyboard text
* label - table label
* q - short quote
* s - underscore (not recommended)
* samp - define sample computer code
* select - project selection
* small - small font text
* span - commonly used inline container, defining text blocks
* strike - underline
* strong - bold emphasis
* sub - bottom Superscript
* sup - Superscript
* textarea - Multi-line text input box
* tt - Telex text
* u - Underline
* var - Define variable
Variable elements
Variable elements determine whether the element is a block element or an inline element according to 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

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

This is the 3rd post in a small series we did on form accessibility. If you missed the second post, check out "Managing User Focus with :focus-visible". In

This tutorial demonstrates creating professional-looking JavaScript forms using the Smart Forms framework (note: no longer available). While the framework itself is unavailable, the principles and techniques remain relevant for other form builders.

The CSS box-shadow and outline properties gained theme.json support in WordPress 6.1. Let's look at a few examples of how it works in real themes, and what options we have to apply these styles to WordPress blocks and elements.

If you’ve recently started working with GraphQL, or reviewed its pros and cons, you’ve no doubt heard things like “GraphQL doesn’t support caching” or

The Svelte transition API provides a way to animate components when they enter or leave the document, including custom Svelte transitions.

How much time do you spend designing the content presentation for your websites? When you write a new blog post or create a new page, are you thinking about

In this article we will be diving into the world of scrollbars. I know, it doesn’t sound too glamorous, but trust me, a well-designed page goes hand-in-hand

npm commands run various tasks for you, either as a one-off or a continuously running process for things like starting a server or compiling code.
