Complete Code for a Simple Bank Homepage
This builds on the styling started in the image to create a professional-looking interface.<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>MyBank - Home</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
background-color: #f4f9fd;
}
header {
background-color: #004080; /* Deep blue for trust */
color: white;
padding: 20px;
text-align: center;
}
nav {
background: #002b55;
padding: 10px;
text-align: center;
}
nav a {
color: white;
text-decoration: none;
margin: 0 15px;
font-weight: bold;
}
.hero {
padding: 50px;
text-align: center;
background: white;
border-bottom: 2px solid #e0e0e0;
}
.btn {
background-color: #ff9900; /* Gold/Orange for call-to-action */
color: white;
padding: 10px 20px;
border: none;
border-radius: 5px;
cursor: pointer;
font-size: 16px;
}
</style>
</head>
<body>
<header>
<h1>Secure Horizon Bank</h1>
</header>
<nav>
<a href="#">Home</a>
<a href="#">Accounts</a>
<a href="#">Loans</a>
<a href="#">Contact Us</a>
</nav>
<section class="hero">
<h2>Banking made simple for you.</h2>
<p>Secure, Fast, and Reliable digital banking at your fingertips.</p>
<button class="btn">Open an Account</button>
</section>
</body>
</html>
Breakdown of the Coding Logic
Color Choice: The user in the image used #004080 (a deep navy blue). In web design, blue is scientifically associated with trust and stability, which is why almost all major banks (like Chase or Barclays) use it.
The <style> Section: This is Internal CSS. It tells the browser how to make the page look (colors, fonts, spacing) without needing a separate file.
The <nav> Tag: This creates the navigation bar. For a college project, keeping this simple and centered is usually the best approach.
The <body> Section: This is the actual content the user sees. The <h1> is the main heading, and the <button> provides an interactive element.