DOM Manipulation Demo

1. Change Text Content

This is the original text.

2. Change HTML Content

This is the original HTML.

3. Clear Element Contents

This will be cleared.

4. Modify Attributes

male superhero

4b. Modify Attributes with setAttribute()

Visit our homepage

5. Update Form Values

Subscribe

6. Modify Classes

Alert box

7. List of Elements

8. Event Handling