WDD 131: Dynamic Web Fundamentals

W03 Learning Activity: Design Principles

Overview

Good design principles are essential for creating a positive, engaging user experience. This course aims to build a strong foundation in effective web design. Understand these principles, apply them consistently, and actively seek constructive feedback to improve.

"Effective web design and art are not the same. But many psychological and design principles apply to websites. You can design a great website by applying the relevant aspects of those laws to your layout, typography, and images. Design for the user and your business objectives." – Peep Laja – CXL

Prepare

As an active learner, use AI as a design reviewer. Take a screenshot of your page and give it to an AI tool with a prompt like this:

"Critique this web page against these design principles: alignment, contrast, visual hierarchy, and consistency. List the three most important problems and explain why each one matters to the user."

Then decide for yourself which suggestions you agree with and why. You are the designer, and the AI is one reviewer.

Activity Instructions

File and Folder Setup

  1. Create a folder named "week03" in the wdd131 directory.
  2. Add a new file named "design.html" to the week03 folder.
  3. Add a "styles" folder to the week03 folder.
  4. Add a new file named "design.css" to the styles folder.

HTML

  1. In the design.html file, add the basic HTML structure.

    Remember that Emmet notation built into VS Code provides shortcuts to code snippets. For example, type html5 and then the TAB key to build a basic HTML5 structure.

    User-defined custom snippets can also be used: VS Code Snippets.

  2. Link the external design.css file.
  3. Add the given HTML content to the <body> of the document provided in this CodePen ☼ WDD Design Principles Start.

Spot the Problems

  1. Before you change any CSS, view the starter page in the browser.
  2. List at least three design problems you see. For each one, name the design principle from the Prepare section that it violates.
  3. Keep your list. As you complete the CSS steps below, check off each problem that gets fixed.

CSS

  1. In the design.css file, copy over the starter CSS code provided in the CodePen.
  2. Fix the padding issues on the div.callout container.
  3. Left-align the <h2> heading instead of centering it.
  4. Check the color contrast by using the CSS Overview tool in the browser's DevTools.

    How to enable and use CSS Overview: Identify potential CSS improvements

  5. Enter the foreground and background colors given in the div.callout container into the Contrast Ratio tool.
    Using the contrast ratio tool, what is the ratio of the two colors? Is that good or bad?

    2.14:1 fails. Normal text needs at least 4.5:1 (AA).

  6. Fix the contrast issues in the div.callout and verify it passes AA and AAA levels.
  7. Lay out the <main> element content in two columns for the article and list.
    • Do not add any additional HTML.
    • Use the grid-template-columns property to create the two columns.
    • The <h2> heading within this <main> container will need to span the two columns.
      How do you do that?

      Use the grid-column property on this <h2> to span the two columns.

  8. Delete the marquee and replace it with a <div class="banner"> static area as shown in the example solution under Check Your Understanding below.

    Why delete the marquee? The marquee element is not supported in HTML5 and is considered deprecated (obsolete or being phased out) even though it may be rendered by most browsers. In terms of design and usability, the marquee is poor because it is unpredictable and distracting. It is also not accessible to users with disabilities.

  9. Move the footer content to the left.

Check Your Understanding

  1. Example Solution: CodePen ☼ WDD Design Principles
  2. Compare the solution to your list from Spot the Problems. Did you find problems that the steps did not fix?
  3. Name two principles that the solution still does not fully meet, and explain how you would fix each one.