+ 1

How to fix the black / white screen when I use html/css/js???

I reinstalled btw

1st Oct 2025, 5:43 AM
I Im a idiot
I Im a idiot - avatar
2 Risposte
+ 1
Blank screen almost always means there’s an error in your code or missing file links. Here’s minimal working template you can copy every time to avoid blank screens: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>My Test Page</title> <style> body { background-color: #f4f4f4; font-family: Arial, sans-serif; text-align: center; margin-top: 50px; } h1 { color: #333; } </style> </head> <body> <h1>Hello World</h1> <p>If you see this, everything is working!</p> <script> // Simple JS test console.log("JS is working!"); alert("JavaScript is running"); </script> </body> </html> If this loads fine but your code shows a blank screen - add your CSS in the <style> section (or link a file), add your JavaScript inside the <script> tags (or link a file), and test step by step. <!-- put CSS in the head --> <link rel="stylesheet" href="style.css"> <!-- put scripts just before </body> --> <script src="script.js"></script> Good Luck!
1st Oct 2025, 6:12 AM
Riyadh JS
Riyadh JS - avatar
0
Thx a lot man
1st Oct 2025, 9:34 PM
I Im a idiot
I Im a idiot - avatar