Quiz: DOM Manipulation Copy

Exercise: DOM Manipulation

  • You should add your solution to the assignments folder (DOM Manipulation) – Week5 repo

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, create a pull request and submit the pull request URL to the Quiz below.

Leave a Reply