Repaso
EspaƱol

In a web page, what are the roles of HTML, CSS and JavaScript?

Options

  1. All three of them do exactly the same job
  2. HTML: structure. CSS: look and layout. JS: behavior (Correct option)
  3. HTML is styling; CSS is logic; JS is content
  4. Only JavaScript is needed to build a web page

Answer

HTML = structure and content; CSS = appearance and layout; JavaScript = behavior and interactivity

Why

Think of a house:

  • HTML is the structure: walls, rooms, doors. Headings, paragraphs, buttons, forms.
  • CSS is the decoration: paint, furniture placement. Colors, fonts, spacing, layout.
  • JavaScript is the electricity: things that react. Clicks, fetching data, updating the page without reloading.

Remember

HTML = what, CSS = how it looks, JS = what it does.

Key terms

Practice this question in Repaso