How to Work with Block and Inline Elements in HTML

  • google plus

In Brief...

Visible elements in HTML may be block or inline. In this how-to, you'll learn the difference between these two types of elements.

Take our Introduction to HTML Training course for free.

See the Course Outline and Register

Instructions

Block Elements

Block elements are elements that separate a block of content. For example, a paragraph (<p>) element is a block element. Other block elements include:

  1. Lists (<ul> and <ol>)
  2. Tables (<table>)
  3. Forms (<form>)
  4. Divs (<div>)

Inline Elements

Inline elements are elements that affect only snippets of content and do not block off a section of a page. Examples of inline elements include:

  1. Links (<a>)
  2. Images (<img>)
  3. Formatting tags (<i>, <b>, <big>, <small>, etc.)
  4. Phrase elements (<em>, <strong>, <code>, etc.)
  5. Spans (<span>)

Webucator provides instructor-led training to students throughout the US and Canada. We have trained over 90,000 students from over 16,000 organizations on technologies such as Microsoft ASP.NET, Microsoft Office, XML, Windows, Java, Adobe, HTML5, JavaScript, Angular, and much more. Check out our complete course catalog.

Categories

Courses

Author: Chris Minnick

Chris is a prolific author and trainer, and the CEO of WatzThis?. His published books include Writing Computer Code, JavaScript for Kids, Coding with JavaScript For Dummies, Beginning HTML5 and CSS3 For Dummies, Webkit For Dummies, CIW eCommerce Certification Bible, and New Riders' XHTML.

Discuss