Open In App

Why Bootstrap is used for mobile application developments ?

Bootstrap is an open-source CSS framework that was developed by Mark Otto. It is mobile-friendly which means the templates render well on every device type. Bootstrap has all the basic templates available needed for basic website development. The framework has various forms, navbar, panels, jumbotron available which can be used for making beautiful web pages. This makes the development process easy, as basic templates are available for ready to use. For this reason, it saves lots of time in the development process. The bootstrap can be accessed from their official website The bootstrap has its latest v 5.0. and majorly all the browsers support the Bootstrap framework.

There are many possible reasons to use Bootstrap for mobile application development. A few of the reasons are discussed below:



Nowadays with varying sizes of devices, it becomes necessary to make a website that is responsive in nature, so that when the website is opened on any other device, it will be feasible for the user to use the website. For example, if we use bootstrap navbar then under small devices, the navbar collapses while using large devices, the navbar can be seen.

Example: This example describes the use of Bootstrap for developing mobile applications.






<!doctype html>
<html lang="en">
 
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href=
          rel="stylesheet"
          integrity=
"sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
          crossorigin="anonymous">
    <title>GeekforGeeks Bootstrap Tutorial</title>
</head>
 
<body>
    <nav class="navbar navbar-expand-lg navbar-dark bg-dark">
        <div class="container-fluid">
            <a class="navbar-brand" href="#">GeekforGeeks</a>
            <button class="navbar-toggler"
                    type="button"
                    data-bs-toggle="collapse"
                    data-bs-target="#navbarSupportedContent"
                    aria-controls="navbarSupportedContent"
                    aria-expanded="false"
                    aria-label="Toggle navigation">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse"
                 id="navbarSupportedContent">
                <ul class="navbar-nav me-auto mb-2 mb-lg-0">
                    <li class="nav-item">
                        <a class="nav-link active" aria-current="page"
                        href="#">DSA</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#">Placement</a>
                    </li>
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle"
                           href="#" id="navbarDropdown"
                           role="button"
                           data-bs-toggle="dropdown"
                           aria-expanded="false">Web Development
                        </a>
                        <ul class="dropdown-menu"
                            aria-labelledby="navbarDropdown">
                            <li>
                                <a class="dropdown-item"
                                   href="#">HTML</a>
                            </li>
                            <li>
                                <a class="dropdown-item"
                                   href="#">CSS</a>
                            </li>
                             
                            <li>
                                <a class="dropdown-item"
                                   href="#">Javascript</a>
                            </li>
                        </ul>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link disabled">Aptitude</a>
                    </li>
                </ul>
                <form class="d-flex">
                    <input class="form-control me-2"
                           type="search"
                           placeholder="Search"
                           aria-label="Search">
                    <button class="btn btn-outline-success"
                            type="submit">Search
                    </button>
                </form>
            </div>
        </div>
    </nav>
    <script src=
            integrity=
"sha384-QJHtvGhmr9XOIpI6YVutG+2QOK9T+ZnN4kzFN1RtK3zEFEIsxhlmWl5/YESvpZ13"
            crossorigin="anonymous">
    </script>
</body>
 
</html>

Output:


Article Tags :