HTML block-level element inline element

block level element - block level element

  • always starts on a new line;
  • Height, line height, and margin and padding are all controllable;
  • The width defaults to 100% of its container unless a width is specified;
  • It can hold inline elements and other block elements

Such as:

  div,table,select等

 

Inline element --inline element

  • and other elements all on one line;
  • Height, line height and margin and padding cannot be changed;
  • The width is the width of its text or picture, which cannot be changed;
  • Inline elements can only hold text or other inline elements.

Such as:

  span, img, a, etc.

 

refers:

https://blog.csdn.net/u013063153/article/details/52524132

Guess you like

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