Open jgagne opened 7 years ago
Nest your headings inside of each section:
Before
<h3> Ingredients:</h3>
<section class="ingredients" id="ingredients">
<h3>Directions</h3>
<section class="directions" id="directions">
After
<section class="ingredients" id="ingredients">
<h3> Ingredients:</h3>
<section class="directions" id="directions">
<h3>Directions</h3>
Resolve nesting issue. You open with<h4>
, so close with an </h4>
on the outside rather than closing on the inside of the </dl>
.
Also, consider this: Remove the <h4>
and just use the <dl>
element. You're marking up a description list, so the heading around it is unnecessary.
Lastly, <br>
elements don't belong mixed in, if you want to add spacing, talk to the <dd>
elements and use CSS to add margin-bottom
instead.
Before
<h4>
<dl>
<dt>Prep time</dt>
<dd><time datetime="10m" itemprop="prepTime"> 10 mins</time></dd>
<br>
<dt>Cook time</dt>
<dd><time datetime="15m" itemprop="totalTime"> 15 mins</time></dd>
<br> Ready in 25 mins
</h4>
</dl>
After
<dl>
<dt>Prep time</dt>
<dd><time datetime="10m" itemprop="prepTime">10 mins</time></dd>
<dt>Cook time</dt>
<dd><time datetime="15m" itemprop="totalTime">15 mins</time></dd>
<dd><em>Ready in 25 mins</em></dd>
</dl>
Add an text alternative by adding an alt
attribute and value to the <img>
element:
Before
<img src="http://rasamalaysia.com/wp-content/uploads/2014/08/sweet-sour-chicken-thumb.jpg" width="389">
After
<img alt="Sweet & Sour Chicken" src="http://rasamalaysia.com/wp-content/uploads/2014/08/sweet-sour-chicken-thumb.jpg" width="389">
For your HTML Microdata to validate properly you need to include what type of page content it is by adding: itemscope itemtype="http://schema.org/Recipe"
to either the <body>
or <article>
start tags.
For example
<article id="top" itemscope itemtype="http://schema.org/Recipe">
The only CSS issue found is the use of max-height
on the img
selector; just use height
.
Before
img {
max-width: 100%;
max-height: auto;
}
After
img {
max-width: 100%;
height: auto;
}
Minor detail — give the navigation some spacing before the image. Add margin-bottom
to the <nav>
.
Consider making an img
folder and adding your image to that folder, then update the path to the image in your index.html
(rather than linking to image from another website).
For example
<img alt="Sweet & Sour Chicken" src="img/sweet-sour-chicken-thumb.jpg" width="389">
Please, add a description and url to your repo:
HTML & CSS Recipe To-Dos
20 to-dos, 5 points each; 5 extra credit to-dos
Essential
Code
35 points
class
,id
, and file and folder names should not have spaces, instead use a hyphen-
or an underscore_
in place of a space). For example,<section id="more-recipes">
not<section id="More Recipes">
;main.css
notMain.CSS
header
,nav
,section
, etc.) and semantic text-level elements (strong
,em
,time
, etc.) See HTML5 Doctor’s HTML5 Element Indexpadding
,border
, andmargin
for spacing and rule elementslink
elementrel="canonical"
tocite
original source of recipetitle
and metadescription
Design
40 points
#f03
not#ff0033
)nav
to navigation to page sections (fragments)#ingredients
,#directions
, etc.@media
for wide-to-wider screens, desktop and laptop, layoutinline-block
orfloat
based columns for wide-to-widermax-width: 60em;
layoutTest
15 points
Git
10 points
index.html
css
(folder containing an external style sheet)main.css
orscreen.css
andprint.css
img
(folder containing images)jiffy-cornbread.jpg
versions
(folder [no spaces] containing tests, experiments, work in progress, etc.)recipe-test-1.html
refs
(folder containing images (screen-shots) and/or comps used as style references)style-idea-1.jpg
README.md
; for example https://github.com/mmuench55/quiche-recipeREADME.md
https://username.github.io/repo
→ https://jgagne.github.io/id-sp17-recipe/)Extra Extra
25 points
<figcaption><small class="photo-credit">Photo by Ayanah Proulx</small></figcaption>
#useful
or Color Safe#forlateruse
h1
–h6
) See also heading and section rankExport > Save for Web (Legacy)…
feature by exporting images at a width of960px
using theJPEG High Preset
, and then use ImageOptim to save a few more KB. (Ideal file size per non-retina image should be under200 KB
.)