6 Program to demonstrate Colors and Backgrounds in BootStrap

Program:

<!DOCTYPE html>

<html lang="en">



<head>

    <meta charset="UTF-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <meta http-equiv="X-UA-Compatible" content="ie=edge">

    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css"

        integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous">

    <!-- CSS only -->

    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css">



    <title>Colors and Backgrounds</title>

</head>



<body>



    <nav class="navbar navbar-expand-sm navbar-dark bg-success">

        <a class="navbar-brand" href="#">Colors and Backgrounds in Bootstrap</a>

        <button class="navbar-toggler" data-toggle="collapse" data-target="#navbarNav">

            <span class="navbar-toggler-icon"></span>

        </button>

    </nav>





    <div class="container mt-5">

        <!--########################START HERE#########################-->



        <!-- TEXT COLORS (info , primary, success , warning , danger , secondary , light)-->

        <h2 class="text-info">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Expedita, sint.</h2>

        <h2 class="text-primary">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Expedita, sint.</h2>

        <h2 class="text-success">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Expedita, sint.</h2>

        <h2 class="text-warning">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Expedita, sint.</h2>

        <h2 class="text-danger">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Expedita, sint.</h2>

        <h2 class="text-secondary">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Expedita, sint.</h2>

        <h2 class="text-light">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Expedita, sint.</h2>



        <hr>

        <!-- BACKGROUND COLORS -->

        <h2 class="bg-primary">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Expedita, sint.</h2>

        <h2 class="bg-secondary">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Expedita, sint.</h2>

        <h2 class="bg-success">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Expedita, sint.</h2>

        <h2 class="bg-danger">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Expedita, sint.</h2>

        <h2 class="bg-warning">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Expedita, sint.</h2>

        <h2 class="bg-info">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Expedita, sint.</h2>

        <h2 class="bg-dark">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Expedita, sint.</h2>



        <hr>

        <!-- INVISIBLE -->

        <h1 class="d-none">Hide Me</h1>



    </div><!-- ./container -->

    <div style="margin-top:500px;"></div>



    <!-- BODY ENDS -->



</body>



</html&gt
;

Output:

Colors and Backgrounds in BootStrap

Previous
Next Post »