Goals

Get started (or continue) with Web languages. This assignment will introduce (or reintroduce) you to HyperText Markup Language (HTML), Cascading Style Sheets (CSS), and Scalable Vector Graphics (SVG).

Instructions

There are three parts for this assignment. You may complete the assignment in a single HTML file or use multiple files (e.g. one for CSS and one for HTML). You may not use D3 or any other external libraries for any of this assignment. The Mozilla Developer Network documentation serves as a great reference for the technologies involved in this assignment. In addition, Scott Murray’s Interactive Data Visualization for the Web is a useful reference (see Chapter 3).

Due Date

The assignment is due at 11:59pm on Friday, September 6.

Submission

You should submit any files required for this assignment on Blackboard. You may complete the assignment in a single HTML file or use multiple files (e.g. one for HTML and one for CSS). Note that the files should be linked to the main HTML document accordingly in a relative manner. If you submit multiple files, you may need to zip them in order for Blackboard to accept the submission. The filename of the main HTML document should be a1.html.

Details

1. Info (HTML & CSS) (15 pts)

Create an HTML web page with the title “Assignment 1”. It should contain the following items:

  • Your name
  • Your student id
  • The course title (“Data Visualization (CIS 490/680)”), and
  • The assignment title (“Assignment 1”)

Use the following html to structure this information:

All of the lines you add should be heading elements. The first line (your name) should be larger than the others. Do not add anything except the header tags (with id and class attributes only) and the text in HTML. Two lines should be added the <!-- Your Info --> section and two lines to the <!-- Class Info --> section.

Style the text using CSS so that your name and student id are displayed in the same color (not black or white), and the course title and assignment title are italicized but not bold. Your name and student id should be on the left side of the page while the course title and assignment title should be on the right side of the page and the text aligned to the right. Add a rectangle (or rounded rectangle) around your name and student id. You must do this using CSS; do not use any HTML attributes except id and class!

Hints
  • Think about using either a class attribute or cascading to reduce the number of rules
  • Consider using the Flexible Box Layout to achieve left- and right- alignment.
  • The border and padding properties will be useful for outlining a region.
  • Header items will be bold by default so you will need to override this (see font-weight).
Example Solution for Part 1
Example Solution for Part 1

2.House (SVG & CSS) (20 pts)

In the same web page, create an SVG graphic that displays a house using SVG. Your graphic should have the frame of the house, a sloped roof, at least one window, and a door with a circular door knob. The window, door, and roof must have a different color from the rest of the house frame, and the door knob must be a different color than the door. Finally, write CSS so that when the mouse is hovering over the door, the door changes color. Other than that, you may choose to customize your house as you see fit.

You may only use SVG lines, polylines, rectangles, circles, polygons, or paths. You should draw all content in a single svg element. For example,

Example Solution for Part 2
Example Solution for Part 2
Hints
  • Remember that SVG coordinates start from the top-left part of the element.
  • The order of the SVG elements determines how they appear.
  • You can style SVG elements with CSS in a similar manner to HTML elements.
  • Investigate the SVG fill and stroke attributes to style the house elements.
  • The :hover psuedo-class will be useful for changing the door’s color