WEEK: 6
Active: March 7th - March 13th
Work Due: March 14th @ 8:00AM

Homework 6

To begin, please download the HW-6 zip file.

Once unzip’d, this directory contains a blank readme.md, index.html file that you will not alter, and the hw-6.js file where you will do your work.

Specification

For this assignment, you are to develop a simple webpage that includes;

  • One or a few headings.
  • A couple paragraph elements.
  • An image or two.
  • At least one link.

Furthermore, this page should “look modern”; meaning it should include styling beyond the default browser styling. However, it does not need to fully follow RWD principles.

To do this, you will utilize the DOM API and Selector API.

You are not allowed to alter the HTML file. You are also not allowed to utilize a general CSS page. Everything must be done through the JavaScript file. In the JS file, you should;

  1. create new nodes,
  2. attach them to parent nodes (and the document node),
  3. add their innerText (if appropriate)
  4. and finally style them.

You are not allowed to use either;

  1. document.write();
  2. element.innerHTML = "";

Instead, you should use the appropriate methods, as mentioned in the readings.

To begin, you should select the body element from the DOM, then remove its existing child nodes. You may then begin to create your web page.


Previous section: