Home  >  Article  >  Web Front-end  >  What are the html inline elements and block level?

What are the html inline elements and block level?

DDD
DDDOriginal
2023-08-21 14:22:234888browse

htmlInline elements and block-level elements include: 1. Inline elements include a, span, strong, em, img, input, button, label, etc.; 2. Block-level elements include div, p, h1-h6, ul, ol, li, table, form, etc.; 3. There are a, span, img, etc. that are both inline elements and block-level elements. When "display: block;" is used, they will become block-level elements.

What are the html inline elements and block level?

#The operating environment of this article: Windows 10 system, Dell G3 computer.

Elements in HTML can be divided into two types: inline elements and block-level elements. These two elements have different characteristics in page layout and display.

Inline Elements:

Inline elements will not occupy a row by default, they will be arranged horizontally on the same line. Inline elements only take up the space required by their content and do not force line wrapping.

Common inline elements are:

: used to create links.

: Used to style or group inline elements in text.

: Text used to express emphasis.

: Used to represent italicized or emphasized text.

: used to insert images.

: used to create input fields.