4. Interactive Apps, Storage & APIs
Browser DevTools Debugging & Publishing Live
Inspect elements, debug JavaScript in the Console and Network tabs, and deploy your finished website free to the internet on GitHub Pages or Vercel.
- Inspect layout, Console logs, and Network requests in Browser DevTools
- Test mobile screen sizes directly inside DevTools Device Toolbar
- Publish a finished static site online for free with GitHub Pages or Vercel
Building a page on your laptop feels great—and two practical habits bridge the gap between a local class exercise and a real shipped product: diagnosing bugs systematically in Browser DevTools and deploying your site live so anyone on earth can open your URL.
Debugging Layout & Code in Browser DevTools
Every modern browser ships with a complete inspection laboratory built right in. Right-click anywhere on a webpage and choose Inspect (or press Cmd + Option + I on Mac / F12 on Windows) to open DevTools. Four tabs handle 95% of daily debugging:
- Elements Tab: Hover over HTML tags to highlight exact dimensions on screen, inspect computed
paddingandmarginin the visual Box Model panel, and toggle CSS checkboxes temporarily without touching your source code. - Device Toolbar (Phone/Tablet Icon): Resize your page to a
375pxmobile screen with one click so you immediately spot horizontal overflow or cramped buttons before your users do. - Console Tab: Displays red JavaScript runtime errors with clickable line numbers, and lets you log structured arrays or objects with
console.log()orconsole.warn(). - Network Tab: Records every image, stylesheet, and
fetch()API call alongside its HTTP status (200 OK,404 Not Found, or500 Server Error) and raw JSON payload.
Whenever a button click seems to do nothing, open the Network tab before clicking again. You will immediately see whether no request fired at all (JavaScript listener bug) or the server returned 404 / 500 (backend URL or payload bug).
Try Structured Debugging Logs Live
Good debug logs label what you are printing and filter straight to suspicious items instead of dumping noisy text. Run this example to see clear logging in action:
Click “Run Code” to execute this snippet right in your browser.
Publishing Your Website Live for Free
Once your HTML, CSS, and JavaScript work cleanly locally, sharing them with the world takes under five minutes and costs $0:
Option A: GitHub Pages (Ideal for Static Sites)
- Push your folder (
index.html,style.css,app.js) to a GitHub repository. - Open Repository → Settings → Pages in your browser.
- Under Source, choose
Deploy from a branch, selectmainand/ (root), and click Save. - Wait ~60 seconds, refresh, and your permanent public link (
https://username.github.io/repo-name) is live with free HTTPS!
Option B: Vercel or Netlify (Best for Dynamic & Framework Apps)
Sign in with your GitHub account on Vercel or Netlify, import your repository, and click Deploy. Every time you run git push in the future, they automatically rebuild and publish your latest update to a fast global CDN—still completely free for personal and portfolio sites.
Final Launch Verification
DevTools & Deployment Checklist
0/4 doneQuick Checkpoints
Which DevTools tab lets you see whether a fetch() API call returned HTTP 200 or 404?