Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Title of the Document</title> <style> #alert { padding: 20px; font-size: 20px; border-radius: 5px; color: red; background-color: yellow; } </style> </head> <body> <script> let div = document.createElement('div'); div.id = "alert"; div.innerHTML = "Welcome to <strong>W3Docs</strong> "; document.body.append(div); </script> </body> </html>