WebLearn

Learn. Practice. Guide.
Back to Courses
STEP 03 • CODING GUIDES

Your Learning Journey: Guide

Review your code, spot common beginner mistakes, and follow clean coding best practices to make your websites neat, responsive, and error-free.

01

HTML & CSS Common Errors

Check your layout and styling against the most frequent mistakes beginners make.

  • Unclosed HTML Tags: Make sure every opening tag like <div>, <p>, or <section> has a matching closing tag.
  • Wrong CSS Selector: Use a dot (.) for a class and a hash (#) for an id.
  • Margin vs. Padding: margin adds space outside a box; padding adds space inside.
  • Missing Semicolon: Always add a ; at the end of each CSS property declaration.
02

JavaScript Debugging Tips

Button or script not working? Use these steps to find and fix issues quickly.

  • Check Browser Console: Press F12 or Ctrl + Shift + I and check the Console tab for red error messages.
  • Use console.log(): Log values or click events using console.log() to verify that your code runs as expected.
  • Matching IDs: Double-check spelling and capitalization in getElementById("...") against your HTML.
  • Script Placement: Place <script src="..."> right before the closing </body> tag.
03

Code Quality & Best Practices

Your page works—now make it clean, readable, and easy to maintain.

  • Proper Indentation: Keep consistent spacing inside nested HTML tags and CSS blocks.
  • Semantic HTML: Use tags like <header>, <nav>, <main>, and <footer> instead of generic <div> elements everywhere.
  • Clear Names: Use descriptive class and file names such as .course-card instead of .box1.
  • Test Responsiveness: Resize your browser window to check how the layout looks on both desktop and mobile screens.
QUICK SELF-CHECK

Before Submitting Your Website

Check off each item as you review your code:

0 / 5 Checked