characteristics of block elements include:
- Always begin on a new line
- Height, line-height and top and bottom margins can be manipulated
- Width defaults to 100% of their containing element, unless a width is specified
Examples of block elements include <div>, <p>, <h1>, <form>, <ul> and <li>.
Inline elements on the other hand have the opposite characteristics:
- Begin on the same line
- Height, line-height and top and bottom margins can't be changed
- Width is as long as the text/image and can't be manipulated.
Examples of inline elements include <span>, <a>, <label>, <input>, <img>, <strong> and <em>.
No comments:
Post a Comment