Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Creating Custom Template for Bootstrap 4 Tooltips</title> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/js/bootstrap.bundle.min.js"></script> <style> .bs-example{ margin: 200px 100px; } .bs-example a{ margin: 25px; font-size: 20px; } /* Styles for custom tooltip template */ .tooltip-head{ color: #fff; background: #000; padding: 10px 10px 5px; border-radius: 4px 4px 0 0; text-align: center; margin-bottom: -2px; /* Hide default tooltip rounded corner from top */ } .tooltip-head .glyphicon{ font-size: 22px; vertical-align: bottom; } .tooltip-head h3{ margin: 0; font-size: 18px; } </style> <script> $(document).ready(function(){ $("#myTooltips a").tooltip({ template : '<div class="tooltip"><div class="arrow"></div><div class="tooltip-head"><h3><i class="fa fa-info-circle"></span> Tool Info</h3></div><div class="tooltip-inner"></div></div>' }); }); </script> </head> <body> <div class="bs-example"> <div id="myTooltips"> <a href="#" data-toggle="tooltip" title="Open this document for editing in a text editor."><i class="fa fa-edit"></i></a> <a href="#" data-toggle="tooltip" title="Save this document on the remote web server on a permanent basis."><i class="fa fa-save"></i></a> <a href="#" data-toggle="tooltip" title="Download this document from the remote server."><i class="fa fa-download"></i></a> <a href="#" data-toggle="tooltip" title="Print this document using a printer installed on your machine."><i class="fa fa-print"></i></a> <a href="#" data-toggle="tooltip" title="Delete this document permanently."><i class="fa fa-trash"></i></a> <a href="#" data-toggle="tooltip" title="Document Settings"><i class="fa fa-cog"></i></a> </div> </div> </body> </html>