Module 1: Getting Started with HTML
HTML vs CSS vs JavaScript
See how the three core front-end technologies work together without doing one another’s jobs.
Think of a sign-up form. HTML defines the form, labels, email field, and submit button. CSS gives it a layout and visual hierarchy. JavaScript might check whether the email has already been registered or update the interface after a request. The browser also provides useful form behavior before any JavaScript is written.
<form action="/newsletter" method="post">
<label for="email">Email address</label>
<input id="email" name="email" type="email" required>
<button type="submit">Subscribe</button>
</form>
The form above is real HTML. It can be submitted when a server endpoint exists. A stylesheet can make it attractive, but CSS is not required for the form to have meaning. JavaScript can enhance the experience, but it should not be used to recreate controls that HTML already provides.
When a page looks wrong, inspect CSS first. When content is missing or poorly structured, inspect HTML. When a control should react to a user action but does not, inspect JavaScript and the browser’s built-in behavior. Keeping these responsibilities distinct makes debugging easier.