Block and Inline elements: Part one

September 20th, 2007 · 10:28 am @ Dave Woods  -  3 Comments

CSS is an important part of any web designer’s skills and therefore it’s extremely important that a designer understands how block elements and inline elements work together and how they can be styled using CSS. This article will explain the default display values of the most commonly used HTML elements whilst part two of this article will explain how CSS can be used to alter the display and visual appearance of these elements.

Block elements

Block elements take up the full width of the page and are naturally displayed on a new line. Block elements can not be nested within inline elements.

Examples of block elements

  • <div>
  • <h1> … <h6>
  • <p>
  • <table>
  • <ul>, <ol>, <dl>
  • <li>, <dt>, <dd>
  • <form>
  • <blockquote>
  • <pre>
  • <address>
  • <fieldset>

Inline elements

Inline elements only take up as much width as is required to display the element and will not force a new line.

Examples of inline elements

  • <span>
  • <img>
  • <a>
  • <strong>
  • <em>
  • <br>
  • <input>, <textarea>
  • <abbr>
  • <acronym>

Not displayed

Some HTML tags are not displayed and should usually be placed within the head of the document.

Examples of none displaying elements

  • <meta>
  • <style>
  • <script>

Block and Inline elements: Part two

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • DZone
  • Reddit
  • StumbleUpon
  • Twitter

3 Comments → “Block and Inline elements: Part one”

  1. [...] Block and Inline elements: Part one, I explained the difference between block and inline elements and how the default display for these [...]

  2. [...] Block and Inline Elements Explained [...]


  3. Marketing Forums

    10 months ago

    Great stuff. Nice to read some well written posts that have some relevancy !


Leave a Reply