Sponsored Ads
All the HTML elements can be categorized into two types. Block Level Elements and Inline Elements.
Sponsored Ads
Block-level Elements
A block-level element always starts on a new line and takes up the full width available i.e. stretches out to the left and right as far as it can. They always appear as if they have a line break before and after them.
Eg: <p>, <div>, <h1>, <h2>, <h3>, <h4>, <h5>, <h6>, <ul>, <ol>, <li>, <dd>, <dl>, <dt>, <pre>, <hr>, <blockquote>, <address>, <header>, <footer>, <main>, <form>, <nav>, <section>, <table>, <thead>, <tfoot>, <tbody>, <article>, <aside>, <canvas>, <fieldset>, <figcaption>, <figure>, <video>, <noscript>
These elements always start on their own new line, and anything that follows them appears on its own new line.
Inline Elements
Inline elements, on the other hand, can appear within sentences and do not have to appear on a new line of their own. They only takes up as much width as the content is.
Sponsored Ads
Eg: <a>, <b>, <i>, <u>, <em>, <strong>, <sup>, <sub>, <big>, <small>, <ins>, <del>, <code>, <cite>, <dfn>, <kbd>, and <var>, <abbr>, <acronym>, <bdo>, <button>, <input>, <label>, <map>, <object>, <output>, <q>, <samp>, <script>, <select>, <span>, <textarea>, <time>, <tt>
HTML Grouping Elements
The two important tags used to group HTML elements are <div> and <span>. We have already discussed HTML Grouping Content. You can read it here.
The <div> is a block level element and used more frequently and <span> is an inline element. Both these elements doesn’t provide any visual change of blocks and inline texts but using CSS we can style it as we want.
Sponsored Ads
Read More: HTML Grouping Content
Sponsored Ads