Questions

  1. What attributes are supported for all HTML elements?

  2. Using the HTML DOM when given a named element, how would you find its element type?

  3. Given a node in the CORE DOM, how would you find the element types of each of its children?

  4. How would you find out the IDs (identifiers) given all DIV elements in a page?

  5. Rather than use innerHTML, how would you go about replacing the header element with a paragraph in the following DIV:

  6. <div id="elem1">
    <h1>This is a header</h1>
    </div>

Answers are provided in the appendix.

Get Learning JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.