Home Html CSS Tutorial How to Create a 404 Error Page Using HTML & CSS

How to Create a 404 Error Page Using HTML & CSS

1110
0

How to Create a 404 Error Page Using HTML & CSS

HTML

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>404 Page</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>
    <div class="box">
        <h1 class="large-number">
            4<span class="center-number">0</span>4
        </h1>
        <span>Ooopps</span>
        <p>This page you were looking for, could n't be found. Visit Homepage</p>
        <a  href="#" class="btn-home">Homepage</a>
    </div>
    
</body>
</html>

CSS

body {
  margin: 0;
  padding: 0;
  background: #0052d4; /* fallback for old browsers */
  background: -webkit-linear-gradient(
    to right,
    #6fb1fc,
    #4364f7,
    #0052d4
  ); /* Chrome 10-25, Safari 5.1-6 */
  background: linear-gradient(
    to right,
    #6fb1fc,
    #4364f7,
    #0052d4
  ); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.box {
  width: 80%;
  height: 80%;
  background-color: #6fb1fc;
  text-align: center;
  border-radius: 10px;
  -webkit-box-shadow: -5px -1px 36px -3px rgba(0, 0, 0, 0.75);
  -moz-box-shadow: -5px -1px 36px -3px rgba(0, 0, 0, 0.75);
  box-shadow: -5px -1px 36px -3px rgba(0, 0, 0, 0.75);
}

.box .large-number,
.box .center-number {
  font-size: 250px;
  color: #ffffff;
  font-weight: 800;
  margin: 0;
}

.box .center-number {
  -webkit-clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.box span {
  font-size: 30px;
}

.box p {
  margin-bottom: 70px;
}

.box .btn-home {
  text-decoration: none;
  color: #ffffff;
  background-color: #0052d4;
  padding: 10px 20px;
  border-radius: 3px;
  text-transform: uppercase;
  border-bottom: 4px solid #ffffff;
}

.box .btn-home:hover {
  color: #6fb1fc;
}
(Visited 621 times, 1 visits today)

LEAVE A REPLY

Please enter your comment!
Please enter your name here