bootstrap 5 404 page examples

Bootstrap 5 404 Page Examples

August 10, 2023 By Aaronn

Welcome to today’s tutorial. In today’s tutorial, we will create a 404 error page using bootstrap 5. For this 404 template we will not use any custom css classes or any other css library. we will create bootstrap 5 404 not found page, 404 error page with image, we will design 404 page. first you need to setup bootstrap 5 project. you can use cdn or read below article.

How to install & setup bootstrap 5

How to Install Bootstrap 5.2 with Vite


Bootstrap 5 404 Page Examples

1. Simple bootstrap 5 404 Page.

<!DOCTYPE html>
<html lang="en">

  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Bootstrap 5 404 Error Page</title>
    <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
  </head>

  <body>
    <div class="d-flex align-items-center justify-content-center vh-100 bg-primary">
        <h1 class="display-1 fw-bold text-white">404</h1>
    </div>
  </body>

</html>
Bootstrap 5 404 Error Page

Bootstrap 5 404 Error Page

2. Bootstrap 5 404 Page not found.

<!DOCTYPE html>
<html lang="en">


    <head>
        <meta charset="UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Bootstrap 5 404 Error Page</title>
        <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
    </head>


    <body>
        <div class="d-flex align-items-center justify-content-center vh-100">
            <div class="text-center">
                <h1 class="display-1 fw-bold">404</h1>
                <p class="fs-3"> <span class="text-danger">Opps!</span> Page not found.</p>
                <p class="lead">
                    The page you’re looking for doesn’t exist.
                  </p>
                <a href="index.html" class="btn btn-primary">Go Home</a>
            </div>
        </div>
    </body>


</html>
Bootstrap 5 404 Page not found

Bootstrap 5 404 Page not found

3. bootstrap 5 page with image.

<!DOCTYPE html>
<html lang="en">

    <head>
        <meta charset="UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Bootstrap 5 404 page with image</title>
        <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
    </head>

    <body>
        <div class="d-flex align-items-center justify-content-center vh-100">
            <div class="text-center row">
                <div class=" col-md-6">
                    <img src="https://cdn.pixabay.com/photo/2017/03/09/12/31/error-2129569__340.jpg" alt=""
                        class="img-fluid">
                </div>
                <div class=" col-md-6 mt-5">
                    <p class="fs-3"> <span class="text-danger">Opps!</span> Page not found.</p>
                    <p class="lead">
                        The page you’re looking for doesn’t exist.
                    </p>
                    <a href="index.html" class="btn btn-primary">Go Home</a>
                </div>

            </div>
        </div>
    </body>

</html>
bootstrap 5 responsive 404 page with image.

bootstrap 5 responsive 404 page with image.

Read Also

Bootstrap 5 Dark Mode Example

Bootstrap 5 Divider Line Example

Bootstrap 5 Login Form Page Example

Bootstrap 5 Gradient Button Example

Bootstrap 5 Card Slider with Splide JS Example

Bootstrap 5 Responsive Footer Section Example