There are three basic groups of HTML tags. Two of these are block tags and inline tags. While there are some stylesheet properties that can be applied to any HTML tag, many of the properties only make sense when applied to one type of tag or the other so it is important for you to understand the difference between them.
So let's take a look at what the difference is between these two types of tags and see which tags belong to which of the two types.
Inline tags are those that you can use within a paragraph of text to make a word or sentence stand out from the rest of the paragraph. Examples of inline tags include b, i, u, big, small, sup, sub, strong, em, and span.
Block tags are those which create a paragraph or the equivalent of a paragraph. All of the heading tags, list tags, and table tags are block tags as are p, blockquote, and div. The main difference that block tags have from inline tags is that the block tags always start on a new line and what follows the end of a block tag also starts on a new line.
Any stylesheet command that relates to positioning, spacing, or alignment can not be applied to an inline tag.
The two tags that are of particular interest to us here are the span and div tags since unlike all of the other inline and block tags these two tags do not have any default stylesheet values associated with them. This makes these two tags ideal for when we want to create our own HTML tags. We will look further at how to use these tags in later tutorials.
This article written by Stephen Chapman, Felgall Pty Ltd.