Inline and Block Element in CSS

Inline and Block Element in CSS - Difference Between Inline and Block Elements in CSS


html block and inline elements in html


Inline and Block Element in CSS:

Inline Elements:

An inline element in html does not start on a new line. As the name inline, it means that the elements are in the one line (inline). An inline element only takes up or occupy as much needed space and width as necessary. Inline element can't contain the block-elements.

Here are the inline elements mentioned below:

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


Block-Level Elements:

This is the block-level element that always starts from a new line. A block-level element forces to occur on a new line and takes up or occupy the full width available. A block-level element takes up or occupy full width available needed space and width as necessary.

Here are the block-level elements mentioned below:

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


Looking Forward:


For more details - Inline and Block Element in CSS - Difference Between Inline and Block Elements in CSS - Best Programming Videos on YouTube - EDUGYAN Channel




Post a Comment

0 Comments