Introduction to Web Development (Frontend)
Students get an overview of frontend web development using HTML, CSS, and basic JavaScript.
About This Topic
Frontend web development uses HTML, CSS, and JavaScript as three distinct but interlocking tools. HTML (HyperText Markup Language) defines the structure and semantic content of a page using elements like headings, paragraphs, links, and forms. CSS (Cascading Style Sheets) controls visual presentation, from colors and fonts to layout and responsive breakpoints. JavaScript adds interactivity and dynamic behavior, responding to user actions and modifying the page without a reload. In the US 10th-grade curriculum, this topic supports CSTA Standard 3A-AP-22, which addresses program design for end-user interaction.
A common challenge is that students initially treat HTML as programming, confusing markup with logic. Establishing the clear role of each technology early prevents this conflation and gives students a mental model for diagnosing which file to edit when something looks wrong versus when something behaves wrong.
Active learning works particularly well here because students can immediately see the result of their changes in a browser. Collaborative builds, where students contribute HTML structure, CSS styles, and JavaScript behavior in assigned roles, reinforce the separation of concerns through direct experience.
Key Questions
- Design a basic webpage structure using HTML.
- Explain how CSS is used to style web content.
- Compare the roles of HTML, CSS, and JavaScript in web development.
Learning Objectives
- Design a basic webpage structure using semantic HTML elements.
- Apply CSS rules to control the visual presentation of HTML content, including layout and typography.
- Compare and contrast the distinct roles of HTML, CSS, and JavaScript in building interactive web applications.
- Identify the purpose of each technology (HTML, CSS, JavaScript) when troubleshooting common web page issues.
Before You Start
Why: Students need to be comfortable with file management, text editors, and navigating a web browser to work with web development files.
Why: Understanding variables, data types, and basic control flow from prior programming units helps in grasping JavaScript's role.
Key Vocabulary
| HTML element | A fundamental building block of an HTML document, consisting of a start tag, content, and an end tag, used to structure content. |
| CSS selector | A pattern used to select the HTML element(s) you want to style. Examples include element names, classes, and IDs. |
| DOM | The Document Object Model represents the HTML document as a tree-like structure, allowing JavaScript to access and manipulate its content and style. |
| semantic HTML | Using HTML elements according to their intended meaning (e.g., `<nav>` for navigation, `<article>` for content) to improve accessibility and SEO. |
Watch Out for These Misconceptions
Common MisconceptionHTML is a programming language.
What to Teach Instead
HTML is a markup language that describes content structure and meaning using tags. It has no logic, no variables, no loops, and no conditionals. Distinguishing markup from programming early helps students understand why you cannot use HTML to perform calculations or respond to user actions, and why JavaScript exists as a separate layer.
Common MisconceptionCSS can replace JavaScript for interactive behavior.
What to Teach Instead
CSS can handle simple states like hover effects and transitions, but it cannot respond to user input, fetch data, or modify the page structure dynamically. JavaScript is required for click handlers, form validation, API calls, and any behavior that depends on runtime conditions. The two technologies are complementary, not interchangeable.
Common MisconceptionYou should write all CSS inline, directly on HTML elements.
What to Teach Instead
Inline CSS overrides stylesheet rules, undermines the cascade, and makes maintaining consistent styles across many pages impractical. Separating CSS into external stylesheets lets one change affect the entire site. Students who experience maintaining both approaches in a project quickly appreciate why external stylesheets are standard practice.
Active Learning Ideas
See all activitiesCollaborative Build: The Three-Layer Webpage
Groups of three each take one responsibility: one student writes only the HTML structure (no styling), another adds only CSS (no HTML changes), and the third adds only JavaScript interactivity. Groups build a simple profile card using this division of labor, then debrief on how the separation affected their workflow and what happened when roles overlapped.
Think-Pair-Share: What Broke and Why?
Show students a webpage where a button has wrong text, wrong color, and clicks do nothing. Students individually identify which technology (HTML, CSS, or JavaScript) is responsible for each problem. Pairs compare, then the class opens browser developer tools to confirm by inspecting the relevant code.
Gallery Walk: Reverse Engineering Real Sites
Post printed screenshots of five websites ranging from minimal to complex. Groups rotate through and annotate each screenshot with colored sticky notes: one color for HTML elements they can identify, one for CSS styling choices, one for likely JavaScript behaviors. The debrief focuses on how complexity scales across the three layers.
Real-World Connections
- Web developers at companies like Google use HTML, CSS, and JavaScript to build the user interfaces for search engines and other popular online services, ensuring they are accessible and easy to navigate.
- Graphic designers and UX/UI specialists collaborate with frontend developers to translate visual mockups into functional webpages, using these technologies to implement branding and user interaction patterns for e-commerce sites like Amazon.
Assessment Ideas
Present students with a simple HTML snippet and a CSS rule. Ask them to predict the visual output in a browser. Then, show them the actual output and ask them to explain any discrepancies, focusing on selector specificity or inheritance.
Provide students with three code snippets: one HTML, one CSS, and one JavaScript. Ask them to label each snippet with its primary role (structure, style, or behavior) and write one sentence explaining why they chose that label.
Students build a small, static webpage with a partner, dividing tasks for HTML structure and CSS styling. After completion, they swap pages and provide feedback on the other pair's HTML semantics and CSS organization, using a simple checklist.
Frequently Asked Questions
What is HTML and what does it do in web development?
How is CSS used to style web content?
What are the different roles of HTML, CSS, and JavaScript in web development?
How does active learning help students understand frontend web development?
More in Network Architecture and Web Systems
Introduction to Network Topologies
Students learn about different network layouts (bus, star, ring, mesh) and their advantages/disadvantages.
2 methodologies
The OSI Model: Layers 1-3
Students break down the physical, data link, and network layers of the OSI model, understanding their functions.
2 methodologies
The OSI Model: Layers 4-7
Students explore the transport, session, presentation, and application layers, focusing on end-to-end communication.
2 methodologies
TCP/IP Protocol Suite
Students focus on the TCP/IP model, understanding its relationship to OSI and its practical implementation.
2 methodologies
Routing and Switching
Students learn how routers and switches direct network traffic, ensuring data reaches its intended destination.
2 methodologies
Introduction to Cloud Computing
Students explore the fundamental concepts of cloud computing, including service models (IaaS, PaaS, SaaS) and deployment models.
2 methodologies