M3- Working with libraries Flashcards
What is the main purpose of CSS and JavaScript libraries in web development?
CSS and JavaScript libraries provide pre-written code that helps you add functionality and style to your website without having to write everything from scratch.
How do you include a CSS library like Bootstrap in an HTML file?
You include a CSS library by adding a < link> tag in the < head> section of your HTML file. The href attribute specifies the URL of the CSS file, and the rel attribute indicates that this link is for a stylesheet.
How do you include a JavaScript library like Bootstrap’s JavaScript in an HTML file?
You include a JavaScript library by adding a < script> tag in the < body> section of your HTML file. The src attribute specifies the URL of the JavaScript file.
What is a dependency in web development?
A dependency is a library or framework that your application relies on to function correctly. Your application depends on these external pieces of code to work properly.
What is a dependency tree, and why can it be complicated?
A dependency tree is the network of dependencies where one library might depend on other libraries. This can become complex because managing all these dependencies manually can be time-consuming and error-prone.
What is a package manager, and why is it useful?
A package manager is a tool that automatically downloads, installs, and manages dependencies (also called packages) for your project. It ensures you’re using the correct versions and handles dependency trees, making it easier to maintain your project.
What is N.P.M., and what is its role in front-end development?
npm (Node Package Manager) is the most common package manager for front-end development. It helps manage and install JavaScript libraries and dependencies in your project.
What is the purpose of a bundling tool in web development?
A bundling tool combines multiple JavaScript or CSS files into a single file (or a few files) to reduce the number of resources a browser needs to load. This improves performance by minimizing the number of HTTP requests.
What are some examples of bundling tools?
Examples of bundling tools include Gulp and Webpack. These tools can combine, optimize, and split your dependencies into bundles to enhance your website’s performance.