HTML Debugging Guide
Learn common causes of blank previews, missing CSS, and null DOM errors—then fix them systematically.
Kroki
- Reproduce the issue with the smallest snippet possible.
- Check the console for runtime errors.
- Verify selectors and IDs match the HTML.
- Disable external scripts temporarily.
- Compare iframe behavior with a downloaded standalone file.
Wskazówka
document.getElementById returns null when the element is missing or the script runs before the node exists in the preview document.