Little Web Hut
(Cascading Style Sheets) CSS 2.1 Reference

CSS Non-replaced and Replaced Elements

CSS groups HTML elements into two categories: non-replaced and replaced. The following are descriptions of each:

  • Non-replaced elements - Most HTML elements have an opening tag, a closing tag, and content in between the two tags. For example:
    <div>content</div>  or  <p>content</p>
    The div and p elements are called non-replaced elements because their content is actually displayed. It is not replaced with something else.
  • Replaced elements - Some HTML elements do not have content in between opening and closing tags. For example:
    <img src="eightball.gif">  or  <input type="reset">
    The img and input elements do not have separate closing tags and therefore do not have any content. These elements use attributes to specify external resources to display. In the example above, the img element specifies an image to display and the input element specifies a button. You can say that their contents are replaced by external resources.