Open In App

What is local installation ?

Improve
Improve
Like Article
Like
Save
Share
Report

Local installation involves the downloading of static files like CSS locally on our system and then using them on our web page. This ensures that the given copy of CSS is loaded from our local machine. This is different than using CSS files hosted on a CDN where the files will be loaded by making a call to the CDN.

There are numerous use cases where a local installation is needed. We can develop our applications without the internet as the CSS files are already present on our system. This can also reduce the dependency on third-party CDNs that may change the version of the file that is hosted on the given URL. Having a local copy also allows us to make changes to the file if the need arises.

Example: In the below example, we will download the latest version of Bootstrap and copy the files to our local system. We will then include these files inside our project folder using the <link> tag.

HTML




<!DOCTYPE html>
<html lang="en">
<head>
    <!-- Include the local CSS and JS files
        of Bootstrap on our local system -->
    <link rel="stylesheet"
          href="/bootstrap-5.1.1-dist/css/bootstrap.css">
    <link rel="stylesheet"
          href="/bootstrap-5.1.1-dist/js/bootstrap.bundle.js">
    <style>
        .button {
            padding: 150px 700px;
        }
    </style>
</head>
<body>
    <div class="button">
        <button type="button" class="btn btn-outline-primary">
            Hello Geeks
        </button>
    </div>
</body>
</html>


Output:

Reference: https://www.geeksforgeeks.org/bootstrap-tutorials


Last Updated : 06 Jun, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads