Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App

Related Articles

How to initialize a dialog without a title bar ?

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

The task is to initialize a dialog without a title bar. In this article, we will see how to initialize the dialog box without any title bar.

A Dialog box is used to provide information in a particular way on the HTML pages. It creates a small window that is protected from the page content. If you want to change its size, color, or any other stuff then just have to edit a few codes and if you want to close that dialog box then you just have to click on the ‘X’ button that is present on the right side of the dialog box.

A dialog box is used to provide more information regarding the topic. It looks systematic when we use this kind of widget in your web application.


  • Create an HTML page and import the jQuery library.
  • The next step is to use the dialog and click() method to create a dialog box whenever we click the button.
  • In the last step, you just have to use a hide() method to hide the title bar of the dialog widget.



<!doctype html>
<html lang="en">
  <meta charset="utf-8"
  <link rel="stylesheet" href=
  <script src=
  <script src=
       background-color: #4CAF50; /* Green */
       border: none;
       color: white;
       padding: 15px 32px;
       text-align: center;
       text-decoration: none;
       display: inline-block;
       font-size: 16px;
    <h2 style="color:green">GeeksforGeeks</h2>
    <button id="opener">open the dialog</button>
    <div id="dialog" title="Dialog Title">
       I'm a dialog
          $( "#dialog" ).dialog({ autoOpen: false });
          $( "#opener" ).click(function() {
             $( "#dialog" ).dialog( "open" );


My Personal Notes arrow_drop_up
Last Updated : 31 Oct, 2021
Like Article
Save Article
Similar Reads
Related Tutorials