Text in a block element, picture centered:
CSS settings: text-align:center
<styletype= "Text/css">Div{text-align:Center;}</style></Head><Body><Div><imgsrc= "Http://img.mukewang.com/52b4113500018cf102000200.jpg" ></Div>
:
Element classification:
block element , inline element (also called inline Element) , and inline block element .
The most common block elements are:
<div>, <p>,
The commonly used inline elements are:
<a>, <span>, <br>, <i>, <em>, <strong>, <label>, <q>, <var>, < Cite>, <code>
used in Inline block Elements are:
, <input>
Inline elements and block elements are converted to each other:
Display:block//Convert inline elements to block elements, such as <a>
Display:inline//Convert block elements to inline elements, such as <div>, <p>
Display:inline-block//Convert element to inline block element.
Inline element Features:
1, and other elements are on one line;
2, the height of the element, the width and the top and bottom margin is not set;
3. The width of the element is the width of the text or Picture it contains, and it cannot be changed.
Inline-block Inline block element features:
1, and other elements are on one line;
2, the height of the element, width, row height, and the top and bottom margin can be set.
Block element Center, Element classification (block, inline, inline block), inline to block