What are the core roles of HTML, CSS, and JavaScript?
HTML structures content, CSS controls appearance and layout, and JavaScript responds to user actions and updates the page.
Study 8 Building Interactive Web Applications with 12 free online flashcards. Review key terms, definitions, and concepts with this interactive flashcard deck.
What are the core roles of HTML, CSS, and JavaScript?
HTML structures content, CSS controls appearance and layout, and JavaScript responds to user actions and updates the page.
What does the Document Object Model let JavaScript do?
The Document Object Model (DOM) represents the page as a document tree that JavaScript can inspect or change.
How does a browser combine HTML, CSS, and JavaScript?
The browser builds a document tree from HTML, applies matching CSS rules, and runs JavaScript that can work with the page.
What is semantic HTML?
Semantic HTML uses elements according to their intended meaning, such as headings for sections, lists for related items, and forms for collecting input.
Why should a form label be associated with its control?
Associate each label with its form control so people can identify the control visually and with assistive technology.
Why use a native button for an interactive control?
Use a native button element: it provides built-in keyboard and browser behavior.
How does JavaScript connect an event to a response?
An event signals that something happened, such as a click or form submission. JavaScript registers a handler with addEventListener() to define the response.
What does event.preventDefault() do during form submission?
Calling event.preventDefault() cancels the browser's default form-submission action, allowing the page to update without that action.
Why combine required with a trimmed-value check?
The required attribute blocks empty input, while a JavaScript check of the trimmed value also catches input made only of spaces.
How should an application display user-entered text safely?
Assign user-provided text with textContent so it is displayed as text rather than interpreted as HTML markup.
Where are tasks kept in the example task list?
The example keeps tasks only in the current page session; it does not send them to a server or describe persistent storage.
How can a task list announce updates accessibly?
A status area with role="status" and aria-live="polite" can announce updates, such as adding or removing a task.