Block-level element, the element row, the row block elements

Block-level elements:

   Exclusive line, width and height of the attribute value to take effect; if not to a width, the width of the default browser i.e. 100%

  Block Tags: p, div, ul, ol, li, dl, dt, dd, h1 ~ h6, form

 

Inline elements:

  There may be multiple line labels, width and height of the attribute value is not effective, rely on content distraction

  Inline tags: a, span, em, strong, b, i, u, label, br

 

Inline block elements:

  Advantage of the combined row and block-level element, can be set not only the width and height, there may also be a plurality of line labels

  Inline block elements: img, input, textarea

 

These three elements can be interchangeable,

  Block - "inline display: inline;

  Inline - "Block display: block;

  Switch inline block elements display: inline-block;

 

Nested rule

  Blocks can be nested row labels, the label can not be nested block row label

  p block sets Do label tag, you may set a, spam, text, etc.

 

Guess you like

Origin www.cnblogs.com/knightdreams6/p/11981435.html