Basic HTML Template in Bootstrap
From the Bootstrap 5 cheat sheet · Getting Started · verified Jul 2026
Basic HTML Template
Starter template with Bootstrap 5
html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap 5 Template</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="container">
<h1>Hello, Bootstrap!</h1>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>💡 Use data-bs-theme="dark" on html tag for dark mode
⚡ Container class provides responsive fixed-width container
📌 Always include viewport meta tag for mobile responsiveness
🔥 Place scripts at end of body for better performance