Skip to main content

Command Palette

Search for a command to run...

Block vs Inline Element, <b> vs <strong> in HTML:

Updated
1 min read
Block vs Inline Element, <b> vs <strong> in HTML:

Block-level Elements: It always starts on a new line. It occupies full line space on the Browser Because the Browser adds space(margin) before and after the element by default. Here, are the lists of all block-level elements in HTML: <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>

Inline Elements: Those elements which occupy space in width according to only requirement. The browser doesn't add space (margin) before and after the element. Here, are the lists of all inline elements in HTML: <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>

<b> vs <strong> Tag: Both tags are used for the same purpose in HTML code. But the difference shows when the screen reader comes into the picture. Because the pronunciation of the content written in different tags (<b>, <strong>) is done separately by the screen reader.

More from this blog

Untitled Publication

21 posts

B.tech (electrical & electronics) graduate but loves to do stuff related computer and always in search of new ideas, fun and knowledge. I hope you enjoy my articles.