Block Elements
A block element always begins on a new line and takes up the entire available width
<address> | <article> | <aside> |
<blockquote> | <canvas> | <dd> |
<div> | <dl> | <dt> |
<fieldset> | <figcaption> | <figure> |
<footer> | <form> | <h1>-<h6> |
<header> | <hr> | <li> |
<noscript> | <main> | <nav> |
<ol> | <p> | <pre> |
<section> | <table> | <tfoot> |
<ul> | <video> |
Example:
<div>Hello</div>
<p>World!</p>
Output:
Hello World! |
Inline Elements
An inline element does not start on a new line and only occupies the necessary width.
<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> |
Example:
<select>Hello</select>
<span>World!</span>
Output:
Hello World! |