Lesson 20 +25 XP

Project 3: My Recipe Page

Make a page that shows a recipe: ingredients (an unordered list) and steps (an ordered list).

The goal

  1. A solid <h1> title.
  1. A small intro paragraph.
  1. Ingredients as a bullet list.
  1. Steps as a numbered list.
  1. A tasteful <hr> between sections.

Structure example

Code

html
<article>
  <h1>Grandma's Pancakes</h1>
  <p>A quick, fluffy breakfast that takes 10 minutes.</p>

<h2>Ingredients</h2>
  <ul>
    <li>2 eggs</li>
    <li>1 cup milk</li>
  </ul>

<hr>

<h2>Steps</h2>
  <ol>
    <li>Whisk the eggs.</li>
    <li>Slowly add the milk.</li>
    <li>Cook until golden on both sides.</li>
  </ol>
</article>

Decide this yourself

  • Should ingredients or steps come first? Justify your choice.
  • Is the whitespace good? &lt;hr&gt; is a whole block-level break.
  • Wrap everything in one &lt;article&gt;? It should.

Checklist

  • [ ] An &lt;h1&gt; for the dish name
  • [ ] Ingredients in a &lt;ul&gt;
  • [ ] Steps in an &lt;ol&gt;
  • [ ] &lt;hr&gt; between sections
  • [ ] Everything wrapped in &lt;article&gt;

TL;DR

Recipes are the perfect practice: two kinds of lists, some headings, and an &lt;hr&gt; divider.