Translate

Tuesday, 30 January 2024

List all Block-Level & Inline Elements in HTML.? 020

 List all Block-Level & Inline Elements in HTML.?


Block-Level Elements:

These elements start on a new line and occupy the full width available unless styled otherwise. They can contain other block-level and inline elements within them.

  • <address>

  • <blockquote>

  • <body>

  • <br> (when using display: block)

  • <dd>

  • <div>

  • <dl>

  • <table>

  • <caption>

  • <form>

  • <h1> to <h6>

  • <hr>

  • <li>

  • <main>

  • <nav>

  • <noscript>

  • <object>

  • <ol>

  • <p>

  • <pre>

  • <section>

  • <script> (when using display: block)

  • <style> (when using display: block)

  • <table>

  • <tbody>

  • <td>

  • <tfoot>

  • <th>

  • <thead>

  • <textarea>

  • <title>

  • <ul>

  • <video>

Inline Elements:

These elements flow within the same line as surrounding content and only occupy the space needed for their content. They typically cannot contain other block-level elements.

  • <a>

  • <abbr>

  • <b>

  • <bdo>

  • <big>

  • <br> (default behavior)

  • <button>

  • <code>

  • <cite>

  • <dfn>

  • <em>

  • <i>

  • <img>

  • <input>

  • <kbd>

  • <label>

  • <map>

  • <mark>

  • <object> (when using display: inline)

  • <output>

  • <q>

  • <ruby>

  • <samp>

  • <script> (default behavior)

  • <select>

  • <small>

  • <span>

  • <strong>

  • <sub>

  • <sup>

  • <time>

  • <tt>

  • <var>

Remember that this is not an exhaustive list, and new elements might be added in future HTML versions. It's always a good practice to refer to the latest HTML specifications for the most accurate information.


No comments:

Post a Comment

Note: only a member of this blog may post a comment.