Testing Your HTML Template Locally
Testing Before Uploading to Web
Best practice: Test locally first, then upload.
What You Need
- Your extracted template files
- Any web browser (Chrome, Firefox, Safari, Edge)
- Text editor to view/edit code (VS Code, Sublime Text)
Method 1: Open in Browser (Simplest)
- Navigate to your template folder
- Find
index.html - Right-click it
- Select Open with → Your Browser
- Site opens in browser
- You can click around and test
Important limitation: Links to other pages won't work with this method.
Method 2: Use Local Server
For full functionality including page links:
Using Python (If installed)
- Open terminal/command prompt
- Navigate to template folder:
cd /path/to/template - Run:
python -m http.server(Python 3) orpython -m SimpleHTTPServer(Python 2) - Output shows:
Serving HTTP on port 8000 - Open browser to:
http://localhost:8000 - Full site now works locally
Using Node.js (If installed)
- Install http-server:
npm install -g http-server - Navigate to template folder:
cd /path/to/template - Run:
http-server - Shows local URL (usually
http://localhost:8080) - Open that URL in browser
- Full site works locally
Using VS Code Live Server
- Open template folder in VS Code
- Install Live Server extension
- Right-click
index.html - Select Open with Live Server
- Site opens with auto-refresh
- Changes reflected immediately
Testing Checklist
When testing locally:
- [ ] All pages load - Click all page links
- [ ] Images appear - Verify images display
- [ ] Styles applied - Colors, fonts, layouts show correctly
- [ ] Forms work - Fill out and submit forms
- [ ] Interactive elements work - Buttons, dropdowns, animations
- [ ] Mobile responsive - Test at mobile width (use browser DevTools)
- [ ] Links correct - All internal links work
- [ ] External links work - External links open in new tab
- [ ] No console errors - Open DevTools (F12) and check console
Browser DevTools (Debugging)
When something doesn't work:
- Right-click on page
- Select Inspect or Inspect Element
- Elements tab - Shows HTML structure
- Console tab - Shows JavaScript errors
- Network tab - Shows failed file loads
- Responsive Design Mode - Test mobile sizes
Fixing Common Local Testing Issues
Images don't load:
- Check image paths are correct
- File names match exactly (case-sensitive)
- Images in correct folder
- Use relative paths (images/photo.jpg not /images/photo.jpg)
Links broken:
- Check HTML file names match
- Ensure all HTML files in root folder
- Use correct page names (about.html not about)
- Verify page exists
CSS not applied:
- Check CSS path correct
- Verify style.css in css/ folder
- Check permissions if uploaded
- Hard refresh browser (Ctrl+Shift+R or Cmd+Shift+R)
JavaScript errors in console:
- Script path might be wrong
- JavaScript file might not exist
- Syntax error in script
- Check script file permissions
Testing on Different Browsers
Test on multiple browsers locally:
- Chrome - Most common, good DevTools
- Firefox - Good for debugging
- Safari - Verify Apple compatibility
- Edge - Windows compatibility
Different browsers may render slightly differently.
Testing on Mobile Devices
After local testing:
- Upload to hosting
- Get your domain URL
- Open on your phone
- Test full functionality
- Check mobile layout
- Test touch interactions