A block element takes up all the width available, so it moves on a new line; the text flow over and under it.
An inline element takes up only the space it needs, so the text flow before and after it, on the same line.
Every html tag belongs to one of the two categories. A <div> is an example of block tag, whereas a <span> is an example of inline tag.
By using CSS we can change the nature of a tag.
display: block;
display: inline;
You are free to nest the elements with one limitation: you can't put a block element inside an inline element. The only exception is the tag <A>
HTML5 has more categories and an element might be part of several of them.
Copyright © 2013 Welcome to the website of Davis Fiore. All Rights Reserved.