Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

What is local installation ?

  • Difficulty Level : Easy
  • Last Updated : 01 Oct, 2021

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.

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.

 

Example:

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


My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!