0 / 9 done

Interactive Mini-Course

HTML & CSS for Canvas

Take it at your own pace. No prior coding experience needed — we start from zero.

Module 0 · Welcome

You Can Already Do This

Before we introduce any jargon: you're going to edit real HTML right now, and see the result change instantly. No setup, nothing to install.

Try changing the text below — replace "Hello" with your own name.

EDIT ME
RESULT

Hello, welcome!

That's it — you just edited HTML! The text between <p> and </p> shows up in the preview. The little labels <p> and </p> are called tags. We'll get to know them in the next module.

Module 1

What Is a Tag?

A tag is a small label wrapped in angle brackets: <like this>. Tags tell the browser what kind of content something is — "this is a heading", "this is a paragraph", "this is bold text".

🎁
Think of it like gift-wrapping
Most tags come in pairs: an opening tag that starts the wrap, and a closing tag with a slash / that ends it. The content lives in the middle, like the gift inside the paper.

Three examples — look at the pattern

HTML <p>This is a paragraph.</p> <h2>This is a heading</h2> <strong>This is bold</strong>
RESULT

This is a paragraph.

This is a heading

This is bold

Notice the pattern: every opening tag <p> has a matching closing tag </p> with a slash. Only the tag name changes — p, h2, strong — everything else follows the same shape.

Try it yourself

Below, the content starts as a paragraph. Change p to h2 in both places — the opening and the closing tag. The indicator shows whether your tags match.

EDIT ME
start typing RESULT

Change the p to h2 or strong

Note: Browsers are forgiving and may render even when tags don't match — but the HTML is technically broken. Always change both the opening and closing tag.

Self-closing tags: A few tags don't wrap any content, so they don't need a closing partner. For example, <img> (an image) and <br> (a line break) stand alone.
Exercise

Complete the Tags

Type the correct tag name in each blank. Remember: the opening and closing tag use the same name.

<>Welcome to the course</>
<>Read this carefully.</>
<>Important!</>
Exercise

Build the Tag — Put the Pieces in Order

Drag the fragments into the correct order to build: <strong>Hello</strong>

<
Hello
strong
>
</
strong
>
Drag the pieces here in the correct order...
Module 2

The Essential Tags

You don't need to memorize hundreds of tags. About ten cover almost everything Canvas Designer creates. Let's meet them, grouped by what they do.

Text tags

These shape written content: headings (different sizes), paragraphs, and emphasis.

HTML <h2>Main Section Title</h2> <h3>Subsection Title</h3> <p>A paragraph of normal text.</p> <strong>Bold text</strong> <em>Italic text</em>
RESULT

Main Section Title

Subsection Title

A paragraph of normal text.

Bold text   Italic text

Why h2, h3, h4? They mean "heading level 2, 3, 4". Smaller number = bigger, more important heading. Canvas uses h1 for the page title, so your content should start at h2.

Lists

Lists come in two flavors: unordered (bullets) and ordered (numbers). Each item sits inside a <li> ("list item") tag.

HTML <ul> <li>Bullet one</li> <li>Bullet two</li> </ul> <ol> <li>First step</li> <li>Second step</li> </ol>
RESULT
  • Bullet one
  • Bullet two
  1. First step
  2. Second step

Try adding a third item to the list below. Copy an existing <li>...</li> line and paste it in.

EDIT ME
start typing RESULT
  • Read the guide
  • Open the designer

Note: When you add a new <li>, don't forget the closing </li>! Browsers will often show the bullet anyway — but the indicator above warns you when a tag is unmatched.

Links, images & containers

HTML <!-- A link --> <a href="https://nord.no">Click here</a> <!-- An image (self-closing) --> <img src="photo.jpg" alt="A photo"> <!-- A generic box / inline span --> <div>A container box</div> <span>Inline wrapper</span>
RESULT

Click here

[image would appear here]

A container box

Text with inline wrapper inside

<div> vs <span>: A <div> is a block — it takes up the full width and creates a new line. A <span> is inline — it sits in the middle of a sentence without breaking it.

Exercise

Sort the Tags into Categories

Drag each tag into the bucket that matches what it does.

<h2>
<ul>
<div>
<strong>
<img>
<li>
<a>
<p>
<span>
Text
Lists
Links & Media
Containers
Module 3

Nesting — Tags Inside Tags

Tags can sit inside other tags. This is how complex designs are built — a container holds a heading, a paragraph, a list, all wrapped together as one group.

📦
Think of it like Russian dolls
Each tag is a box. You can put smaller boxes inside a bigger box. But — and this is important — if you opened a box, you must close it after closing everything that was inside it.
HTML <div style="background: #f7fafa; padding: 20px; border-radius: 8px;"> <h3>Learning Outcomes</h3> <p>After this module you can:</p> <ul> <li>Explain the concept</li> <li>Apply it in practice</li> </ul> </div>
RESULT

Learning Outcomes

After this module you can:

  • Explain the concept
  • Apply it in practice

See how the <div> wraps everything? On its own, a <div> is invisible — it's just a container. But the moment you give it styling (background, padding, border-radius), it becomes the card you see above — visually grouping the heading, paragraph and list as one unit.

Try it: remove the div

In the editor below, try deleting the <div style="..."> opening line and the </div> closing line. Watch the card disappear — the content becomes plain flowing text. That's exactly what the div was doing for us.

EDIT ME
RESULT

Learning Outcomes

After this module you can:

  • Explain the concept
  • Apply it in practice

One more thing: the indentation in the code is just a visual aid for us humans — the browser ignores spaces. What matters is that </div> comes after all the tags nested inside it are closed.

The rule: Tags must close in the reverse order they opened. Like nested parentheses: ( [ ] ) is correct, ( [ ) ] is wrong.
Exercise

Arrange the Nested Tags

Drag the lines into the correct order to build a div containing a heading and a paragraph. Remember: outer tag opens first and closes last.

</div>
  <h3>Title</h3>
<div>
  <p>Some text</p>
Drag the lines here in the correct order...
Exercise

Spot the Nesting Error

One of these snippets has tags closed in the wrong order. Which one?

<div><h3>Title</h3><p>Text</p></div>
<ul><li><strong>Bold item</strong></li></ul>
<div><p>Some text</div></p>
<p>Click <a href="#">here</a> to learn more.</p>
Module 4

Attributes — Extra Info on Tags

So far our tags have just wrapped content. But some tags need extra information: a link needs to know where to go; an image needs to know which file to show.

That extra information lives in attributes — name-value pairs written inside the opening tag.

HTML <!-- Link: href says where to go --> <a href="https://nord.no">Visit Nord</a> <!-- Image: src = file, alt = description --> <img src="campus.jpg" alt="Nord campus"> <!-- Style: adds visual design --> <div style="background: #f7fafa;">Styled box</div>
RESULT

Visit Nord

[Nord campus image]
Styled box

The pattern is always: name="value" inside the opening tag. Notice the quotes around the value — they're required.

Common attributes

style="..."
Visual design (colors, spacing, layout)
href="..."
Where a link goes (on <a> tags)
src="..."
Which image or video file to show
alt="..."
Image description (screen readers, accessibility)
id="..."
Unique name for one specific element
class="..."
Group label for shared styling

Try changing the link destination

Change the URL in href="..." to any other website. The link in the preview updates — but of course clicking it won't leave this page.

EDIT ME
Exercise

Read the Tag

Look at this HTML carefully and answer the question.

<a href="https://canvas.instructure.com">Free Canvas Account</a>

What text will the user see on the page?

https://canvas.instructure.com
Free Canvas Account
href
Module 5

Inline Styles — Making Things Look Good

This is where design lives. The style attribute contains CSS properties — small instructions like "color: blue" or "padding: 20px".

Each property follows the same pattern: property: value; — a colon between them, a semicolon at the end.

HTML <div style=" background: #f7fafa; padding: 20px; border-radius: 8px; border-left: 4px solid #00B0B9; "> <h3 style="color: #003D4C;">Info Box</h3> <p>This is styled.</p> </div>
RESULT

Info Box

This is styled.

Try one property at a time

Change the color value below to see different results. Try #EC5742 (red), #007041 (green), or orange.

EDIT ME
RESULT

Change my color!

Add padding and a background

Now let's make a styled box. Try changing the padding number (e.g. 40px) or the border-radius (try 50px for very round corners).

EDIT ME
RESULT
A gentle green card

The properties you'll see most

color
Text color
color: #003D4C;
background
Background color
background: #f7fafa;
padding
Space INSIDE the box
padding: 20px;
margin
Space OUTSIDE the box
margin: 16px 0;
border
Line around the box
border: 1px solid #d4e3e6;
border-radius
Rounded corners
border-radius: 8px;
font-size
Text size
font-size: 1.2em;
display: flex
Arrange items side by side
display: flex; gap: 12px;

Padding vs margin — what's the difference?

This is the #1 confusion for beginners. Padding is the space inside an element (between its border and its content). Margin is the space outside an element (pushing neighbors away). Drag the sliders to see both in action.

Another
element
Our element
padding 16px
margin 8px
padding — space inside the box, between its border and its content
margin — space outside the box, pushing neighboring elements away

Memory hook: think of padding as cushioning inside a gift box (protects the content), and margin as breathing room between gift boxes on a shelf.

Targeting one side at a time

So far we've used padding: 20px which applies the same value to all four sides. But you can also target each side individually — and Canvas Designer does this all the time.

HTML <!-- Only the top border --> <div style="border-top: 3px solid #00B0B9; padding: 20px; background: #f7fafa;"> Accent line on top only </div> <!-- Extra space only above --> <p style="margin-top: 32px;"> Big gap above me </p> <!-- Different padding per side --> <div style="padding-top: 8px; padding-left: 40px;"> Tight top, wide left </div>
RESULT
Accent line on top only

Big gap above me

Tight top, wide left

The pattern: {property}-{side}. You can add a hyphen and one of top, right, bottom, or left to most spacing and border properties:

padding-top
Space only above the content
padding-left
Space only on the left side
margin-bottom
Extra space below (before next element)
border-top
Line only on top (accent lines in Canvas Designer use this!)

Shorthand: all four sides in one line

You can also pass multiple values to padding or margin to set all sides at once. The order is clockwise from the top:

padding: 20px; /* all four sides */ padding: 10px 20px; /* top+bottom, left+right */ padding: 10px 20px 30px; /* top, left+right, bottom */ padding: 10px 20px 30px 40px; /* top, right, bottom, left (clockwise) */

Try it yourself: in the editor below, experiment with border-top, margin-top, and side-specific padding. Try changing numbers and colors to see what happens.

EDIT ME
RESULT
Info card

Notice the turquoise line on top, the extra padding on the left, and the big margin above.

Exercise

Match Each Property to What It Does

Drag each CSS property onto the description that matches it.

padding
border-radius
color
background
Changes the text color
Fills the box with color
Adds space inside the box
Rounds the corners
Exercise

Your Styling Playground

Experiment freely. Try changing values, adding new properties, or even adding new tags. The preview updates instantly.

EDIT ME
RESULT

Hello, Canvas!

Change any value above.

Module 6

Canvas Rules — What Survives

Canvas has a strict HTML filter. It quietly removes certain CSS properties and HTML elements when you save a page. Knowing what gets stripped prevents surprises later.

CANVAS STRIPS THESE <!-- WRONG: font-weight is removed by Canvas --> <p style="font-weight: bold;">This won't be bold</p> <!-- CORRECT: use <strong> tag instead --> <p><strong>This WILL be bold</strong></p>
The #1 gotcha: font-weight: bold in a style attribute gets removed. Canvas Designer always uses <strong> tags instead — if you edit the HTML manually, remember this!

Survives Canvas

  • color, background
  • padding, margin
  • border, border-radius
  • font-size, line-height
  • display: flex / grid
  • text-align, text-decoration
  • <strong>, <em>
  • <details> / <summary>

Stripped by Canvas

  • font-weight (use <strong>)
  • text-transform
  • letter-spacing
  • box-shadow
  • opacity (use rgba)
  • transition, transform
  • <script>, <style>
  • <button>, <form>
Exercise

Canvas or Stripped?

Sort each CSS property: does it survive when Canvas saves, or does Canvas remove it?

border-radius
font-weight
padding
box-shadow
display: flex
text-transform
background
opacity
Survives Canvas
Gets Stripped
Module 7

Reading Real Designer Output

Time to put it all together. Here's actual HTML exported from Canvas Designer. You now have the vocabulary to read every piece of it — tags, nesting, attributes, inline styles.

DESIGNER OUTPUT <div style="background: #f7fafa; padding: 24px; border-radius: 8px; border: 1px solid #d4e3e6; border-top: 3px solid #00B0B9;"> <div style="display: flex; align-items: center; gap: 12px; margin-bottom: 12px;"> <div style="width: 32px; height: 32px; background: #00B0B9; color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center;"> <strong>i</strong> </div> <h3 style="color: #003D4C; margin: 0;"> <strong>Key Concept</strong> </h3> </div> <p style="color: #4a5568; line-height: 1.7; margin: 0;"> HTML tags define structure. CSS styles define appearance. </p> </div>
RESULT
i

Key Concept

HTML tags define structure. CSS styles define appearance.

Exercise

Scavenger Hunt

Look at the code above and answer these three questions.

1. What color is the top accent border?

#003D4C (dark blue)
#00B0B9 (turquoise)
#d4e3e6 (light gray)

2. What makes the little "i" icon appear as a circle?

display: flex
border-radius: 50%
width: 32px

3. Why is "Key Concept" bold?

font-weight: bold in the style
Because <h3> is always bold anyway
The <strong> tag wraps the text

So — where do I paste HTML into Canvas?

Every Canvas page, assignment, and discussion uses the same rich text editor. To paste HTML, you need to switch it to HTML view using the </> button in the toolbar.

Before — the normal visual editor:

Edit View Insert Format Tools Table
12pt ▾ Paragraph ▾ B I U 🔗 📷 📹
Welcome to the course! This is what Canvas looks like before you switch to HTML view — normal rich text.
p
0 words </> click this +

After clicking </> — you're now in HTML mode, paste here:

Edit View Insert Format Tools Table
<p>paste your HTML here...</p> <h2>Then click Save.</h2>
HTML Editor
</>
  1. Open a Canvas page in edit mode
  2. Click the </> button in the toolbar — the editor switches to HTML view
  3. Paste your HTML
  4. Click Save. Your designed page appears instantly.

Tip: If you need to edit later, go back into HTML view with </>. Canvas's visual editor can sometimes reformat complex HTML, so for structural changes always use HTML view.

You made it through!

You now understand HTML tags, nesting, attributes, inline styles, and what Canvas preserves. You can read Canvas Designer output, make small tweaks, and know why <strong> is used instead of font-weight. When you're ready to design, open the Canvas Designer and start building!