View video tutorial

HTML Inline Elements


HTML inline elements do not create new line itself.

Inline Elements

Inline element takes up the space for an element only as much space it require.

Inline element do not create new line unnecessary.

A single line can contain one or more inline elements.

Learning with HTML Editor "Try it Now"

You can edit the HTML code and view the result using online editor.


<!DOCTYPE html>
<!-- Example: Inline Elements -->
    <title>Inline Elements Example</title>
        .highlight {
            background-color: #ee3;
            font-size: 20pt;
            color: #fff;
            background-color: #303030;
    <h1>Inline Elements Example</h1>
    <div><b>Lorem</b> Ipsum is <span class="highlight">inline dummy text </span> of the printing and typesetting
        <i>inline dummy text</i> has been the industry's standard dummy text ever since the 1500s,
        when an unknown printer took a galley of type and scrambled it to make a type specimen book.
Try it Now »

Click on the "Try it Now" button to see how it works.

Inline Elements are

<a>, <abbr>, <acronym>, <audio>, <b>, <bdi>, <bdo>, <big>, <br>, <button>, <canvas>, <cite>, <code>, <data>, <datalist>, <del>, <dfn>, <em>, <embed>, <i>, <iframe>, <img>, <input>, <ins>, <kbd>, <level>, <map>, <mark>, <meter>, <noscript>, <object>, <output>, <picture>, <progress>, <q>, <ruby>, <s>, <samp>, <script>, <select>, <slot>, <small>, <span>, <strong>, <sub>, <sup>, <svg>, <template>, <textarea>, <time>, <u>, <var>, <video>, <wbr>.