HTML5 > Structures

Dialog box in HTML5

How to provide in-page dialog box functionality in HTML5?


By using <dialog> tag we can provide in-page dialog box functionality. This tag is not supported in most of the browsers and Google chrome supports this tag.

<body>
    
    This is used to provide in-page  dialog box functionality. 

    <em>Not supported in most of the browser. Google Chrome supports it.</em>
    
    DotNetFunda.com s a popular online tutorials and guide for latest Microsoft® technologies aimed 
    for beginners and intermediate level professionals. We help beginners to become intermediate 
    level professionals and help intermediate level professionals to become an expert. 
    By following our different sections regularly, we hope you will soon become one of the 
    
    'Most Valuable' <dialog open>DNF MVC</dialog>
    
    professional and start shining in your career.

</body>

In the above code snippet we can notice that, DNF MVC is placed in <dialog> tag. As its attribute is "open" so the dialog would be shown in the browser.

Output

Notice that the text inside the <dialog> tag appears as a dialog in the webpage.

 Views: 5062 | Post Order: 73



Write for us






Hosting Recommendations