Bootstrap snippet and html example. Alerts with link button

This html snippet was created to help web designers, web developers, front-end and back-end developer save time. Use it for free in your project and build your app faster, You can also download the HTML, CSS, and JS code.

HTML code

This is the html code used to create this bootstrap snippet, You can copy and paste the following html code inside a page with bootstrap 5.1.3 included, to get the result that you can see in the preview selection

 <!-- created by https://www.codesnippets.dev.br/post/como-fazer-alert-boxes-com-buttons-bootstrap-5 -->
    <!-- @BrCodeSnippets -->
    <div class="container mt-3 pt-3">
        <div class="row">
            <div class="col-12">
                <div class="alert alert-primary" role="alert">
                    <span class="fw-bolder">Info</span>
                    A simple primary alert—check it out! <a class="btn btn-primary btn-sm float-end" href="#"> Ação</a>
                </div>
                <div class="alert alert-secondary" role="alert">
                    <span class="fw-bolder">Info</span>
                    A simple secondary alert—check it out! <a class="btn btn-secondary btn-sm float-end" href="#"> Ação</a>
                </div>
                <div class="alert alert-success" role="alert">
                    <span class="fw-bolder">sucess</span>
                    A simple success alert—check it out! <a class="btn btn-success btn-sm float-end" href="#"> Ação</a>
                </div>
                <div class="alert alert-danger" role="alert">
                    <span class="fw-bolder">Erro </span>
                    A simple danger alert—check it out! <a class="btn btn-danger btn-sm float-end" href="#"> Ação</a>
                </div>
                <div class="alert alert-warning" role="alert">
                    <span class="fw-bolder">Aviso</span>
                    A simple warning alert—check it out! <a class="btn btn-warning btn-sm float-end" href="#"> Ação</a>
                </div>
                <div class="alert alert-info" role="alert">
                    <span class="fw-bolder">Info</span>
                    A simple info alert—check it out! <a class="btn btn-info btn-sm float-end" href="#"> Ação</a>
                </div>
                <div class="alert alert-light" role="alert">
                    <span class="fw-bolder">Mensagem</span>
                    A simple light alert—check it out! <a class="btn btn-light btn-sm float-end" href="#"> Ação</a>
                </div>
                <div class="alert alert-dark" role="alert">
                    <span class="fw-bolder">Mensagem</span>
                    A simple dark alert—check it out! <a class="btn btn-dark btn-sm float-end" href="#"> Ação</a>
                </div>
            </div>
        </div>
    </div>

CSS code

This is the css code used to create this bootstrap snippet, You can copy and paste the following css code inside a page with bootstrap 5.1.3 included, to get the result that you can see in the preview selection

body{margin-top:20px;}

Similar snippets

Bootstrap example and template. Responsive login with social buttons

Responsive login with social buttons

Bootstrap example and template. chat room

chat room

Bootstrap example and template. light contact list

light contact list

Bootstrap example and template. Clear inbox list

Clear inbox list

Bootstrap example and template. bs5 dark footer

bs5 dark footer

Bootstrap example and template. Meet our heroes

Meet our heroes

Bootstrap example and template. Project view details page

Project view details page

Bootstrap example and template. Note cards

Note cards

Bootstrap example and template. Alerts with link button

About this bootstrap example/template

We hope you will enjoy this awesome snippet and stay tuned for the latest updates, bootdey snippets are already used in thousands of blogs, websites and projects. We believe it will save your precious time and gives trendy look to your next web project.

We always try to offer the best beautiful and responsive source of Bootstrap code examples and components.

This code example currectly have 304 views, Using this bootstrap snippet you have the following benefits:

Bootstrap 5.1.3

<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css'>

<script src='https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js'></script>

This code example is based on bootstrap 5.1.3 and the grid system of this framework

Responsive

Based on bootstrap framework makes all the layouts perfectly responsive for all devices

Crossbrowser compatibility

Tested on all major browsers, it works smoothly on all of them

semantic html 5

Built on html / css3 the code quality is really amazing

Simple Integration

This code example can be simply integrated on existing sites and new ones too, all you need to do is copy the code and start working