Online visitors

People learning around the world

Online

—

Visitors exploring W3Schools

Online visitors by country Circles show approximate country locations. The country list provides the visitor counts.

Circles represent countries, not exact visitor locations.

Country

Online

Loading country activity…

    Bootstrap 5 Hide on Mobile

    Bootstrap 5 Examples


    This example code contains Bootstrap 5 classes that hide HTML elements on mobile devices.

    <p class="d-none d-sm-block">Hidden only on mobile </p>

    In the above HTML code, the .d-none class hides the HTML element on all devices, and the .d-sm-block class shows the element on small devices and beyond.

    Classes are named using the format; Different formats can be used as described below:

    .d-{breakpoint}-{value}

    The breakpoint is one of sm, md, lg, xl, and xxl.

    And the value is one of:

    • none
    • inline
    • inline-block
    • block
    • grid
    • table
    • table-cell
    • table-row
    • flex
    • inline-flex


    Found This Page Useful? Share It!
    Get the Latest Tutorials and Updates
    Join us on Telegram

    Notifications

    Updates are enabled for this browser.

    Receive new tutorials, articles and learning resources. You can turn updates off anytime.