Como instalar y usar Bootstrap - Jose Aguilar Blog (2024)

Bootstrap se puede instalar de distintas formas. Una forma sencilla de hacerlo es visitar la página oficial de Bootstrap y descargar el paquete.

De esta forma, puedes tener los archivos de este framework en tu servidor.

El paquete de descarga lo puedes descomprimir en la raiz de tu proyecto o en el directorio que tu quieras.

En los archivos de instalación de Bootstrap puedes ver un directorio donde están las hojas de estilo (css), otro directorio para los ficheros JavasScript (js) y un directorio de fuentes (fonts) donde se encuentra la fuente por defecto para los iconos que utiliza Bootstrap. La fuente que utiliza Bootstrap para los iconos se llama Glyphicons.

Revisando el archivo de descarga, puedes observar que Bootstrap se puede adaptar a cualquier tipo de proyecto destinado a la Web ya sea desarrollado desde 0 o con algún gestor de contenidos como WordPress o Joomla, o para cualquier plataforma de e-commerce como por ejemplo PrestaShop o Magento.

Para poder trabajar con Bootstrap tan solo debes añadir en la cabecera, dentro de la etiqueta <head> o antes de la etiqueta de cierre </body> de tu archivo HTML las hojas de estilo y el archivo JavaScript de Bootstrap.

<link rel="stylesheet" href="css/bootstrap.min.css" crossorigin="anonymous"><link rel="stylesheet" href="css/bootstrap-theme.min.css" crossorigin="anonymous"><script src="js/bootstrap.min.js" crossorigin="anonymous"></script>

También existe la posibilidad de no descargar nada y utilizar los CDN (Content Delivery Network) copiando lo siguiente en la cabecera <head> de tu archivo HTML.

Source codeComo instalar y usar Bootstrap - Jose Aguilar Blog (6)
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"><script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6ji*zo" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script><script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>

Para descargar los archivos o ver los enlaces que necesitas para tu cabecera puedes visitar el enlace de descarga de Bootstrap.

Ver Hola Mundo con Bootstrap 4

Como instalar y usar Bootstrap - Jose Aguilar Blog (2024)

FAQs

How do I download and install Bootstrap? ›

Download
  1. jsDelivr. The folks over at jsDelivr graciously provide CDN support for Bootstrap's CSS and JavaScript. ...
  2. Install with Bower. You can also install and manage Bootstrap's Less, CSS, JavaScript, and fonts using Bower:
  3. Install with npm. You can also install Bootstrap using npm:
  4. Install with Composer.

How to install Bootstrap using command prompt? ›

Documentation
  1. Run npm install to install the Node.js dependencies, including Hugo (the site builder).
  2. Run npm run test (or a specific npm script) to rebuild distributed CSS and JavaScript files, as well as our docs assets.
  3. From the root /bootstrap directory, run npm run docs-serve in the command line.
Feb 20, 2024

What is one way to add Bootstrap to your website? ›

To add Bootstrap to an existing project, you can add the required link tag to your head element and the script tags right before the closing </body> tag. After adding Bootstrap, you should see some of the styles on your web page change.

Do you need to download Bootstrap to use it? ›

There are two ways to start using Bootstrap on your own web site. You can: Download Bootstrap from getbootstrap.com. Include Bootstrap from a CDN.

Should I use Bootstrap as a beginner? ›

It depends! If you already have a handle on front end development languages like HTML, CSS and JavaScript, you can probably pick up the basics of Bootstrap in a week or two. But if you're a new coder with no experience, you may find the framework somewhat intimidating.

What is Bootstrap example? ›

Bootstrap is a popular front-end framework for web development. It contains pre-built components and design elements to style HTML content. Modern browsers such as Chrome, Firefox, Opera, Safari, and Internet Explorer support Bootstrap.

How do I know if bootstrap is installed? ›

To check version of the Bootstrap open /css/bootstrap. css file and on the top of this file, there is a version number. You can also review version history by checking Releases log.

Where do I put bootstrap code? ›

Use the bootstrap. min. js file before the end of the <body> portion of your HTML file to use the Bootstrap JS components. As mentioned before, jquery.

Do I need Bootstrap on my website? ›

Building a responsive site is much easier using Bootstrap than doing so from scratch. Bootstrap comes with responsive styles, like containers and media queries, to ensure your site adjusts to the viewport. That means you don't have to worry about whether your visitors are using desktops, tablets, or mobile devices.

Do people still use Bootstrap? ›

Yes. Bootstrap is still the most used CSS framework. For its ease of use and widespread support, it's a great choice to complete a project quickly, even in 2024.

How to create a blog website using Bootstrap? ›

Creating a Blog with Bootstrap
  1. Step 1 - blog-overview.html. Add the HTML below to your web page. ...
  2. Step 2 - blog-overview.css. Download the CSS below and include it in your web page. ...
  3. Step 3 - Add the includes below to your Blog Pages. ...
  4. Step 1 - blog-detail.html. ...
  5. Step 2 - Add the includes below to your Blog Detail page.

How do I get Bootstrap? ›

Looking to quickly add Bootstrap to your project? Use jsDelivr, provided for free by the folks at jsDelivr. Using a package manager or need to download the source files? Head to the downloads page.

How do I know if Bootstrap is installed? ›

To check version of the Bootstrap open /css/bootstrap. css file and on the top of this file, there is a version number. You can also review version history by checking Releases log.

Top Articles
Latest Posts
Article information

Author: Dong Thiel

Last Updated:

Views: 6598

Rating: 4.9 / 5 (59 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Dong Thiel

Birthday: 2001-07-14

Address: 2865 Kasha Unions, West Corrinne, AK 05708-1071

Phone: +3512198379449

Job: Design Planner

Hobby: Graffiti, Foreign language learning, Gambling, Metalworking, Rowing, Sculling, Sewing

Introduction: My name is Dong Thiel, I am a brainy, happy, tasty, lively, splendid, talented, cooperative person who loves writing and wants to share my knowledge and understanding with you.