0
0
Bootsrapmarkup~5 mins

Bootstrap folder structure

Choose your learning style9 modes available
Introduction

Bootstrap folder structure helps organize files so your website looks good and works well. It keeps things neat and easy to find.

When starting a new website project using Bootstrap.
When you want to keep your CSS, JavaScript, and images organized.
When working with a team to make sure everyone knows where files are.
When you want to easily update or add new styles and scripts.
When you want your website to load faster by managing files properly.
Syntax
Bootsrap
project-folder/
├── index.html
├── css/
│   └── bootstrap.min.css
├── js/
│   └── bootstrap.bundle.min.js
└── img/
    └── logo.png

The index.html is the main webpage file.

The css folder holds Bootstrap styles.

Examples
This example adds a custom CSS and JavaScript file for your own styles and scripts.
Bootsrap
my-site/
├── index.html
├── css/
│   ├── bootstrap.min.css
│   └── custom.css
├── js/
│   ├── bootstrap.bundle.min.js
│   └── script.js
└── images/
    └── banner.jpg
This example uses an assets folder to group images and fonts separately.
Bootsrap
website/
├── home.html
├── css/
│   └── bootstrap.min.css
├── js/
│   └── bootstrap.bundle.min.js
└── assets/
    ├── images/
    └── fonts/
Sample Program

This HTML file uses Bootstrap CSS and JavaScript files stored in css and js folders. It shows a styled header and a button.

Bootsrap
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <title>Bootstrap Folder Structure Example</title>
  <link href="css/bootstrap.min.css" rel="stylesheet" />
  <link href="css/custom.css" rel="stylesheet" />
</head>
<body>
  <header class="bg-primary text-white p-3">
    <h1>Welcome to My Site</h1>
  </header>
  <main class="container mt-4">
    <p>This page uses Bootstrap CSS from the <code>css</code> folder.</p>
    <button class="btn btn-success">Click Me</button>
  </main>
  <script src="js/bootstrap.bundle.min.js"></script>
  <script src="js/script.js"></script>
</body>
</html>
OutputSuccess
Important Notes

Always keep Bootstrap files in separate folders like css and js for clarity.

Use meaningful folder names like images or assets to organize pictures and fonts.

Link your CSS and JS files correctly in your HTML to make sure styles and scripts work.

Summary

Bootstrap folder structure organizes your project files clearly.

Keep CSS, JavaScript, and images in separate folders.

This helps your website load properly and makes it easier to maintain.