This guide explains the approach and principles used to create comprehensive HTML documentation for infrastructure and software projects.
Documentation should mirror and reinforce the software architecture. Each component gets its own focused document that clearly explains its purpose, boundaries, and relationships.
Documentation serves multiple audiences:
Documentation evolves with the codebase and captures both current state and architectural decisions.
Main Documentation (project.html) ├── Component Docs (component1.html, component2.html, etc.) ├── Standards References (docs/standards/) └── Supporting Materials (README.md, style guides)
Every document includes:
Information flows from general to specific:
Overview → Architecture → Implementation → Details
Bootstrap Alert Classes (Preferred):
alert alert-danger - Critical decisions requiring immediate attentionalert alert-warning - Important context and warningsalert alert-success - Completed features and positive outcomesalert alert-info - Technical architecture informationalert alert-primary - Key workflows and processesalert alert-secondary - Cross-component integration detailsLegacy Custom Classes (Backward Compatible):
Add Bootstrap Icons CDN to your HTML documents:
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.0/font/bootstrap-icons.css">
Benefits:
bi-check-square - Completedbi-square - Pendingbi-hourglass-split - In Progressbi-x-circle - Failed/Errorbi-house-door - Homebi-arrow-left - Backbi-box-arrow-up-right - Externalbi-link-45deg - Linkbi-exclamation-triangle-fill - Dangerbi-exclamation-circle-fill - Warningbi-info-circle-fill - Infobi-check-circle-fill - Successbi-code-slash - Codebi-database - Databasebi-cpu - Systembi-plug - API/Integration<h2><i class="bi bi-book section-icon"></i>Section Title</h2>
<div class="alert alert-info border-start border-4 border-info">
<h3><i class="bi bi-info-circle-fill alert-icon"></i>Information</h3>
</div>
<span class="badge bg-success"><i class="bi bi-check-circle-fill"></i> Complete</span>
<li><i class="bi bi-check-circle"></i> Completed task</li>
<li><i class="bi bi-arrow-right-short"></i> Action item</li>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document Title</title>
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- Bootstrap Icons -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.0/font/bootstrap-icons.css">
</head>
<body>
<div class="container-fluid">
<!-- Navigation -->
<nav class="navbar navbar-dark bg-dark rounded mb-4">
<a class="navbar-brand" href="main.html">
<i class="bi bi-arrow-left"></i> Back
</a>
</nav>
<!-- Breadcrumb -->
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="main.html"><i class="bi bi-house-door"></i> Main</a></li>
<li class="breadcrumb-item active">Current Page</li>
</ol>
</nav>
<!-- Content -->
<h1><i class="bi bi-journal-code"></i> Page Title</h1>
<!-- Sections -->
</div>
<!-- Bootstrap JS -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
<!-- Dark mode support -->
<script>
if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
document.documentElement.setAttribute('data-bs-theme', 'dark');
}
</script>
</body>
</html>
Bootstrap 5.3+ includes built-in dark mode support. Add this script to automatically detect system preferences:
<script>
if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
document.documentElement.setAttribute('data-bs-theme', 'dark');
}
</script>
Add a floating button for easy navigation in long documents:
<button id="scrollTopBtn" class="btn btn-primary">
<i class="bi bi-arrow-up-circle"></i>
</button>
<script>
window.onscroll = function() {
if (document.documentElement.scrollTop > 300) {
document.getElementById('scrollTopBtn').style.display = 'block';
} else {
document.getElementById('scrollTopBtn').style.display = 'none';
}
};
document.getElementById('scrollTopBtn').onclick = function() {
window.scrollTo({top: 0, behavior: 'smooth'});
};
</script>
This style guide ensures consistent, professional, and maintainable documentation that serves both technical and business needs while supporting the long-term success of your projects.