Tallaght Campus

Department of Computing

Bootstrap

  1. What is it?

    What is it?

    Bootstrap

    • is a front-end framework, providing CSS and Javascript libraries
    • is free!
    • was originally developed in Twitter
    • is now an open source project hosted on GitHub (since 2011)

    In this module

    • we use only the CSS portion of Bootstrap
    • we use the latest version of Bootstrap, i.e. Bootstrap version 5

  2. What is it for?

    What is it for?

    Boostrap

    • provides various styling rules for various html elements
    • includes features for easy development of responsive websites
    • includes mobile-first styles that can aid in development for mobile devices
  3. How are the styles applied?

    How are the styles applied?

    • Bootstrap styles are defined in a CSS file, where they are associated with classes by means of the usual ruleset syntax.
    • To use a Bootstrap style you must
      • include the Bootstrap CSS file as a link in your html file (you can copy the link html element provided in section CSS on this web page)
      • make the element you want to style a member of the Bootstrap class associated with the desired style

        Let's say that the following element apears in a web page

        <button>Button text</button>
        						
        It is rendered as follows by default:

         

        If the element were assigned to Bootstrap classes btn and btn-primary, it would appear as follows in HTML:

        <button class="btn btn-primary">Button text</button>
        						
        In this case it would be rendered in the style of a Bootstrap primary button:

    • You can use a Bootstrap documentation, e.g. on W3 Schools, as a catalogue of all the Boostrap styles that are available.
  4. To use or not to use it?

    To use or not to use it?

    • It speeds up development check_box
    • Makes it easier to create a professional-looking website check_box
    • Provides responsivenes check_box
    • Provides consistency of look and feel check_box
    • Makes a website's look and feel the same as that of millions of other websites indeterminate_check_box
  5. Where to get more information?