Quiz: DOM Manipulation Copy

Exercise: DOM Manipulation

Let’s start preparing the structure of our files:

  1. create 2 files with .js and .html extensions.

  2. Create the basic template for your html file.

  3. Link your files together using <script> tag.

  4. In your .js file do the following:

    • Create a <p> with red text that says "Hey I’m red!" and add it to the document’s body
    • Create and add an <h3> with blue text that says "I’m a blue h3!"
    • Create and add a <div> with a black border and pink background color with the following elements inside of it:
      • another <h1> that says "I’m in a div"
      • a <p> that says "ME TOO!"
      • Hint for this one: after creating the div with createElement, append the <h1> and <p> to it before adding it to the document.body.
  5. Push your solution to a private Github repo and submit the URL to the Quiz below.

Leave a Reply