Element definitions

  • Replaced elements – the element’s content is replaced by something that is not directly represented by document content. For example, <img>
  • Nonreplaced elements – their content is presented by the user agent (generally a browser) inside a box generated by the element itself. For example, <span>hi there</span> is a nonreplaced element, and the text “hi there” will be displayed by the user agent.

  • Block-level elements generate an element box that (by default) fills its parent element’s content area and cannot have other elements at its sides. In other words, it generates “breaks” before and after the element box. The most familiar block elements from HTML are <p> and <div>.
  • Inline-level elements generate an element box within a line of text and do not break up the flow of that line. The best inline element example is the <a> element in XHTML. Other candidates are <strong> and <em>.

By Bryan Xu

Posted in CSS

Leave a Reply