How to Add Dialog Box in Bootstrap?

By Hardik Savani November 5, 2023 Category : Bootstrap

We always need to dialog box in our project because modal is very interesting and specially for GUI. Always we like to use modal for creating data or editing data and also for conformation. So if you think how to set modal in my project then it is very easy you have to just copy bellow example and run in your local you will find result. In this example i provide bootstrap modal example with code so it pretty simple to use.


<html lang="en">


<title>Bootstrap modal popup example</title>

<link href="" rel="stylesheet">

<script src=""></script>

<script src=""></script>



<a href="#myDemoModal" role="button" class="btn btn-large btn-success" data-toggle="modal">Promote Demo Modal</a>

<!-- Modal HTML -->

<div id="myDemoModal" class="modal fade">

<div class="modal-dialog">

<div class="modal-content">

<div class="modal-header">

<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>

<h4 class="modal-title">I am from</h4>


<div class="modal-body">

<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod

tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,

quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo

consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse

cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non

proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>


<div class="modal-footer">

<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>

<button type="button" class="btn btn-success">I Read</button>





<!-- Modal HTML End -->