I need to achieve something similar to the following
confirm ('<h1>Hello</h1>')
The expected output should be the Hello in confirm box with h1 element font-size
You can't customize the alert box because it is a system object. If you need customization, you will need to create your own HTML element.