HTML Inline and Block Element

Each HTML element has a default display value that varies based on the type of element it is.

There are two major categories:

HTML Inline element

The same line is used to show inline items. They don’t begin on a new line and just occupy the space necessary by the material they contain.

The <span> tag is an example of an inline element.

<span>Hello Technalay</span>
HTML

Another example of an Inline element:

<a> <abbr> <acronym> <b> <bdo> <big> <br> <button> <cite> <code> <dfn> <em> <i> <img> <input> <kbd> <label> <map> <object> <output> <q> <samp> <script> <select> <small> <span><strong> <sub> <sup> <textarea> <time> <tt> <var>

HTML

HTML Block element

Block components occupy the whole horizontal area in their container. They take up the necessary amount of height and begin on a new line.

HTML paragraph <p> tags are a type of block element.

<p>Hello Technalay</p>
<div>Hello Technalay</div>
HTML

Another example of a block element:

<address> <article> <aside> <blockquote> <canvas> <dd> <div> <dl> <dt> <fieldset> <figcaption><figure> <footer> <form> <h1>-<h6> <header> <hr> <li> <main> <nav> <noscript> <ol> <p> <pre><section> <table> <tfoot> <ul> <video>

HTML

By- Maridul Srivastava

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *