HTML, CSS & JS

HSC Software Engineering · Unit 2: Programming for the web

HTML, CSS & JS notes

Fact-checked by a second, independent AI review.

Overview of how HTML builds structure, CSS styles it, and JavaScript adds interactivity for web pages. Focus on core ideas, terminology, and typical exam questions for NSW HSC Software Engineering.

HTML basics
Structure with elements and attributes; semantic HTML helps accessibility and search engines.
CSS basics
Selectors, properties, values; box model and specificity; responsive design with media queries.
JavaScript basics
DOM manipulation, events, and simple interactivity; client-side validation basics.
Interplay among HTML, CSS, JS
HTML provides content, CSS styling, and JS behaviour; understand their roles and how they work together.
Common exam focus
Explain purposes of HTML/CSS/JS, compare their roles, describe DOM event flow, write small scripts to modify classes or styles.

Remember it: H-C-J mnemonic: HTML creates structure, CSS creates style, JS adds motion/interactivity.

Exam tip: Markers expect correct terms (HTML elements/attributes/semantic HTML, CSS selectors/box model/media queries, DOM/events), clear explanations of how files interact, and short code snippets showing a toggle or style change. Be able to compare roles and describe basic DOM event handling.

Syllabus checklist

  • HTML
  • CSS & JS: core ideas
  • Terms and typical exam questions for "Programming for the web" in NSW HSC Software Engineering

Practice questions

  1. 1. Which tag creates a hyperlink in HTML?

    Answer checked

    Show answer

    Answer: <a>. The <a> tag defines hyperlinks in HTML.

  2. 2. CSS selectors match HTML elements.

    Answer checked

    Show answer

    Answer: True. CSS selectors target HTML elements by type, class, id, etc.

  3. 3. The HTML attribute used to specify the path to a resource is ____.

    Answer checked

    Show answer

    Answer: href. href specifies the URL or path for links and resources.

  4. 4. Which CSS property centers a block element horizontally?

    Answer checked

    Show answer

    Answer: margin: 0 auto. margin: 0 auto horizontally centers a block with a fixed width.

  5. 5. What is the event type for a mouse click?

    Answer checked

    Show answer

    Answer: click. The click event fires when a pointing device button is pressed and released on an element.

Practise html, css & js as a game

Hearts, combos, streaks and an AI tutor that explains every answer. Start free.

Start free

More from Unit 2: Programming for the web