HTML Debugging Guide

Learn common causes of blank previews, missing CSS, and null DOM errors—then fix them systematically.

코딩 시작

단계

  1. Reproduce the issue with the smallest snippet possible.
  2. Check the console for runtime errors.
  3. Verify selectors and IDs match the HTML.
  4. Disable external scripts temporarily.
  5. Compare iframe behavior with a downloaded standalone file.

document.getElementById returns null when the element is missing or the script runs before the node exists in the preview document.

관련 도구