Element Classification

replaced and nonreplaced.

The content of nonreplaced elements is presented inside a box generated by the element itself. For example, <span>hi</span> is a nonreplaced element and the text hi is displayed.

The content of replaced elements is replaced by something. For example, the img element is replaced by an image file external to the document itself. <img> has no actual content:

 
<img src="http://java2s.com/Book/HTML-CSSImages/star.png" alt="Hi" />
  

From the code above we can see that there is no content contained in the <img> element.

Block vs Inline

Block-level elements generate "breaks" before and after the element box. The most popular block elements from HTML are p and div. List items are a special case of block-level elements.

Inline-level elements generates an element box within a line of text and do not break up the flow. For example, <a> element.

Home 
  HTML CSS Book 
    CSS  

Introduction:
  1. What is Cascading Style Sheets (CSS)
  2. Adding Styles to HTML
  3. Specifying the Character Encoding of a Stylesheet
  4. How Styles Cascade and Inherit
  5. Element Classification
  6. Cascading Style Sheets prefixes for the most popular browsers
Related: