In HTML, not easy to understand which tags are block level or inline elements. Today we discussion about this, Html elements are only based on “block” and “inline” level elements.
Block: Block level tags are mostly used on the webpages as a container section, <div> is most common element for containers. Headings (<h1>, <h2>…<h6>), paragraph (<p>), table tag as so are also the members of block level elements. Block level elements contain full width available of browser.
//All below are block tags <div>, <section>, <article>, <aside>, <header>, <footer>
Inline: An inline element does not start on new lines. It generally contains other inline tags and text or data. But inline tags used inside the block tags.
List of inline elements
- b, big, i, small, tt
- abbr, acronym, cite, code, dfn, em, kbd, strong, samp, var
- a, bdo, br, img, map, object, q, script, span, sub, sup
- button, input, label, select, textarea