Free UI/UX design course
Learn how to create exceptional designs by reading my new tutorial.
Start learningQuick start
We have a long and fascinating journey ahead of us. However, before we move on to the individual aspects of our planned tour, I would like you to have the opportunity right now to feel the potential that MDB gives you.
Therefore, in this short and concise lesson, I will show you how super fast and easily you can launch MDB and create your first small project.
Step 1 - download and setup MDB
We will use the simplest method of installing MDB, i.e. download the .zip package.
Go to the installation page and click the big, red button "MDB 5 download".

Then unzip the downloaded package and open it in your favorite code editor.
Note: The code editor is a matter of preference, but if someone asks me what I would recommend, my answer is Visual Studio Code.
It's free and you can download it here.
Step 2 - open index.html
file
In the unpacked MDB directory, locate the index.html
file, then drag and drop it into the browser window. You will see the MDB welcome message.

Then open index.html
in the code editor. You will see a code like this:
That's quite a lot of code, and it can feel a bit overwhelming to start with. But don't worry about it now, we'll explain in detail what each of these lines means and does in the next lessons.
Step 3 - prepare index.html
file for the new project
Let's remove unnecessary code so we have a place for our new project.
On line 25 you will find the comment Start your project here
and on line 46 you will find End your project here
. In between is the code with the MDB welcome message:
Remove it, save the file, and refresh the browser. You should see a completely blank, white screen. Now we are ready to start our project.
Step 4 - add navigation bar
Go to the navbar documentation page and locate the section "Basic example" at the very beginning of that page. Click "show code" and copy only HTML code (we will learn about later JavaScript part).
Then paste it into the index.html
file and save it. After refreshing the browser you should see a nice, interactive navigation bar.
You have just successfully used the first MDB component. Good job!
Step 5 - add jumbotron
It would be good to add some element that would stand out from the start.
Such an element may be a jumbotron, which is commonly understood as a banner with information crucial for our website.
Directly under the navbar, add the following code:
Save the file and refresh the browser. Our website is taking shape!
Step 6 - add grid
There is a very nice component called a card. Cards are not only visually attractive, but also great for presenting various types of content.
Card title
Some quick example text to build on the card title and make up the bulk of the card's content.
ButtonWouldn't it be great to have some nice cards like this in our design? Sure it would!
However, there is a problem - how to place them in our layout so that they display correctly on both large screens and phones? Of course, on large screens we want to have them next to each other, say 3 in a row. On the other hand, they should line up one above the other on mobile.
This is where bootstrap grid comes in handy, which is a powerful tool for creating a responsive layout.
We will learn about the grid in detail in future lessons. Now just trust me and just follow the steps given.
Go to the grid documentation page and copy the code from the basic example section.
Then paste it below the jumbotron component.
After saving the file and refreshing your browser, you should see paragraphs that indicate each of the three columns.
Step 7 - add cards
Now we're ready to add cards.
Go to the cards documentation page and copy the HTML code form the section "Image with ripple".
What is ripple? Ripple is a Material Design effect of the propagation of circular waves upon interaction with a given element. In the documentation example, click the image or the button in the card to see it.
Then paste the card code into each column in our project in index.html
.
If you want, you can change the pictures and texts in the cards to whatever you like.
Save the file and refresh the browser. Woah! Our website looks really good now.

There is one little thing worth improving. If you look closely you can see that the bottom edge of the jumbotron touches the top edge of the cards. They would look better if there was a space between them.
It's very easy to fix. Just add mb-5
class (which stands for "margin-bottom 5 units large ") to the jumbotron. We will learn more about it in the future lessons, but right now just add this to your project:
Step 8 - add footer
The final step of our small project will be adding a footer.
A footer is an additional navigation component. It can hold links, buttons, company info, copyrights, forms, and many other elements.
Go to the footer documentation page and copy the code of the Basic example.
Then paste it below the grid with the cards:
Save the file and refresh the browser. You should see an extensive gray footer below the tabs.
However, we have a similar problem as in the step above - the bottom edge of the cards touches the top edge of the footer. Let's fix this by adding the mb-5
class to each of the card
component.
Alright, our first MDB project is ready!
And look, it displays properly on any size screen. Change the size of the browser window to mobile view to see for yourself. Isn't it nice?
Well done, you!
Bonus - if you add a special attribute data-mdb-theme="dark"
to the <html>
element, your project will change the theme to dark mode!
Note: In future lessons we will learn the details of how theming and dark mode work in MDB.

If something did not work out as it should or if you want to make sure that you did everything right - click the button below to see the final result.
FInal demo & source code
About author
Michal Szymanski
Co Founder at MDBootstrap / Listed in Forbes „30 under 30" / Open-source enthusiast / Dancer, nerd & book lover.
Author of hundreds of articles on programming, business, marketing and productivity. In the past, an educator working with troubled youth in orphanages and correctional facilities.