HTML + CSS / GRID PRACTICE · STEP 1 OF 8
Place and span Grid items
Checking your account…
GUIDED PRACTICE
Place and span Grid items
In index.html, build the tiles inside the body. Keep the supplied document head and stylesheet link.
Your code stays in one editor through every step. Word wrap is enabled.
Step 1 of 8
Create the page regions
Three columns have four boundary lines, numbered 1 through 4. Keep the region order useful for reading before placing anything.
Your task
In index.html, build the tiles inside the body. Keep the supplied document head and stylesheet link.
To pass this step:
- Just below the
LAYOUTcomment inside thebodyelement, add amainelement. Give it the classlayout. - Inside that
mainelement, add fourdivelements in this order: dashboard, topics, practice, notes. - Give every new
divthe classtile. Each tile also needs its own second class, listed below. - Give the first tile the class
leadand the visible textStudy dashboard. - Give the second tile the class
menuand the visible textYour topics. - Give the third tile the class
contentand the visible textToday’s practice. - Give the fourth tile the class
notesand the visible textReview notes.
Press the play button labeled Run & check this step below the editor to run your code and see your check results.
Your editor is opening.
Each step builds on the last. Finish the current step before opening the next one; your code stays with you.
This is one possible solution. Compare it with your own code; opening it does not replace your work or complete a step.
* {
box-sizing: border-box;
}
body {
margin: 0;
padding: 16px;
font-family: Arial, sans-serif;
line-height: 1.5;
color: #17283c;
background-color: #f4f7fb;
}
.layout {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
grid-auto-rows: 80px;
gap: 12px;
}
.tile {
padding: 12px;
background-color: #e0f2fe;
border: 1px solid #005f80;
}
/* LEAD TILE */
/* TOPIC SIDEBAR */
/* PRACTICE PANEL */
/* REVIEW NOTES */
/* SUMMARY TILE */
/* SMALL SCREENS */
/* LEAD TILE */
/* TOPIC SIDEBAR */
/* PRACTICE PANEL */
/* REVIEW NOTES */
/* SUMMARY TILE */
/* SMALL SCREENS */<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Place and span Grid items</title>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<!-- LAYOUT: Add your main element below this comment. -->
<main class="layout">
<div class="tile lead">Study dashboard</div>
<div class="tile menu">Your topics</div>
<div class="tile content">Today’s practice</div>
<div class="tile notes">Review notes</div>
</main>
</body>
</html>* {
box-sizing: border-box;
}
body {
margin: 0;
padding: 16px;
font-family: Arial, sans-serif;
line-height: 1.5;
color: #17283c;
background-color: #f4f7fb;
}
.layout {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
grid-auto-rows: 80px;
gap: 12px;
}
.tile {
padding: 12px;
background-color: #e0f2fe;
border: 1px solid #005f80;
}
/* LEAD TILE */
.lead {
grid-column: 1 / -1;
}
/* TOPIC SIDEBAR */
/* PRACTICE PANEL */
/* REVIEW NOTES */
/* SUMMARY TILE */
/* SMALL SCREENS */
/* TOPIC SIDEBAR */
/* PRACTICE PANEL */
/* REVIEW NOTES */
/* SUMMARY TILE */
/* SMALL SCREENS */<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Place and span Grid items</title>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<!-- LAYOUT: Add your main element below this comment. -->
<main class="layout">
<div class="tile lead">Study dashboard</div>
<div class="tile menu">Your topics</div>
<div class="tile content">Today’s practice</div>
<div class="tile notes">Review notes</div>
</main>
</body>
</html>* {
box-sizing: border-box;
}
body {
margin: 0;
padding: 16px;
font-family: Arial, sans-serif;
line-height: 1.5;
color: #17283c;
background-color: #f4f7fb;
}
.layout {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
grid-auto-rows: 80px;
gap: 12px;
}
.tile {
padding: 12px;
background-color: #e0f2fe;
border: 1px solid #005f80;
}
/* LEAD TILE */
.lead {
grid-column: 1 / -1;
}
/* TOPIC SIDEBAR */
.menu {
grid-column: 1 / 2;
grid-row: 2 / 4;
}
/* PRACTICE PANEL */
/* REVIEW NOTES */
/* SUMMARY TILE */
/* SMALL SCREENS */
/* PRACTICE PANEL */
/* REVIEW NOTES */
/* SUMMARY TILE */
/* SMALL SCREENS */<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Place and span Grid items</title>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<!-- LAYOUT: Add your main element below this comment. -->
<main class="layout">
<div class="tile lead">Study dashboard</div>
<div class="tile menu">Your topics</div>
<div class="tile content">Today’s practice</div>
<div class="tile notes">Review notes</div>
</main>
</body>
</html>* {
box-sizing: border-box;
}
body {
margin: 0;
padding: 16px;
font-family: Arial, sans-serif;
line-height: 1.5;
color: #17283c;
background-color: #f4f7fb;
}
.layout {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
grid-auto-rows: 80px;
gap: 12px;
}
.tile {
padding: 12px;
background-color: #e0f2fe;
border: 1px solid #005f80;
}
/* LEAD TILE */
.lead {
grid-column: 1 / -1;
}
/* TOPIC SIDEBAR */
.menu {
grid-column: 1 / 2;
grid-row: 2 / 4;
}
/* PRACTICE PANEL */
.content {
grid-column: 2 / -1;
grid-row: 2 / 3;
}
/* REVIEW NOTES */
/* SUMMARY TILE */
/* SMALL SCREENS */
/* REVIEW NOTES */
/* SUMMARY TILE */
/* SMALL SCREENS */<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Place and span Grid items</title>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<!-- LAYOUT: Add your main element below this comment. -->
<main class="layout">
<div class="tile lead">Study dashboard</div>
<div class="tile menu">Your topics</div>
<div class="tile content">Today’s practice</div>
<div class="tile notes">Review notes</div>
</main>
</body>
</html>* {
box-sizing: border-box;
}
body {
margin: 0;
padding: 16px;
font-family: Arial, sans-serif;
line-height: 1.5;
color: #17283c;
background-color: #f4f7fb;
}
.layout {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
grid-auto-rows: 80px;
gap: 12px;
}
.tile {
padding: 12px;
background-color: #e0f2fe;
border: 1px solid #005f80;
}
/* LEAD TILE */
.lead {
grid-column: 1 / -1;
}
/* TOPIC SIDEBAR */
.menu {
grid-column: 1 / 2;
grid-row: 2 / 4;
}
/* PRACTICE PANEL */
.content {
grid-column: 2 / -1;
grid-row: 2 / 3;
}
/* REVIEW NOTES */
.notes {
grid-column: 2 / -1;
grid-row: 3 / 4;
}
/* SUMMARY TILE */
/* SMALL SCREENS */
/* SUMMARY TILE */
/* SMALL SCREENS */<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Place and span Grid items</title>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<!-- LAYOUT: Add your main element below this comment. -->
<main class="layout">
<div class="tile lead">Study dashboard</div>
<div class="tile menu">Your topics</div>
<div class="tile content">Today’s practice</div>
<div class="tile notes">Review notes</div>
</main>
</body>
</html>* {
box-sizing: border-box;
}
body {
margin: 0;
padding: 16px;
font-family: Arial, sans-serif;
line-height: 1.5;
color: #17283c;
background-color: #f4f7fb;
}
.layout {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
grid-auto-rows: 80px;
gap: 12px;
}
.tile {
padding: 12px;
background-color: #e0f2fe;
border: 1px solid #005f80;
}
/* LEAD TILE */
.lead {
grid-column: 1 / -1;
}
/* TOPIC SIDEBAR */
.menu {
grid-column: 1 / 2;
grid-row: 2 / 4;
}
/* PRACTICE PANEL */
.content {
grid-column: 2 / -1;
grid-row: 2 / 3;
}
/* REVIEW NOTES */
.notes {
grid-column: 2 / -1;
grid-row: 3 / 4;
}
/* SUMMARY TILE */
/* SMALL SCREENS */<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Place and span Grid items</title>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<!-- LAYOUT: Add your main element below this comment. -->
<main class="layout">
<div class="tile lead">Study dashboard</div>
<div class="tile menu">Your topics</div>
<div class="tile content">Today’s practice</div>
<div class="tile notes">Review notes</div>
<div class="tile summary">One small win complete</div>
</main>
</body>
</html>* {
box-sizing: border-box;
}
body {
margin: 0;
padding: 16px;
font-family: Arial, sans-serif;
line-height: 1.5;
color: #17283c;
background-color: #f4f7fb;
}
.layout {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
grid-auto-rows: 80px;
gap: 12px;
}
.tile {
padding: 12px;
background-color: #e0f2fe;
border: 1px solid #005f80;
}
/* LEAD TILE */
.lead {
grid-column: 1 / -1;
}
/* TOPIC SIDEBAR */
.menu {
grid-column: 1 / 2;
grid-row: 2 / 4;
}
/* PRACTICE PANEL */
.content {
grid-column: 2 / -1;
grid-row: 2 / 3;
}
/* REVIEW NOTES */
.notes {
grid-column: 2 / -1;
grid-row: 3 / 4;
}
/* SUMMARY TILE */
.summary {
grid-column: 1 / span 3;
grid-row: 4 / 5;
}
/* SMALL SCREENS */<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Place and span Grid items</title>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<!-- LAYOUT: Add your main element below this comment. -->
<main class="layout">
<div class="tile lead">Study dashboard</div>
<div class="tile menu">Your topics</div>
<div class="tile content">Today’s practice</div>
<div class="tile notes">Review notes</div>
<div class="tile summary">One small win complete</div>
</main>
</body>
</html>* {
box-sizing: border-box;
}
body {
margin: 0;
padding: 16px;
font-family: Arial, sans-serif;
line-height: 1.5;
color: #17283c;
background-color: #f4f7fb;
}
.layout {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
grid-auto-rows: 80px;
gap: 12px;
}
.tile {
padding: 12px;
background-color: #e0f2fe;
border: 1px solid #005f80;
}
/* LEAD TILE */
.lead {
grid-column: 1 / -1;
}
/* TOPIC SIDEBAR */
.menu {
grid-column: 1 / 2;
grid-row: 2 / 4;
}
/* PRACTICE PANEL */
.content {
grid-column: 2 / -1;
grid-row: 2 / 3;
}
/* REVIEW NOTES */
.notes {
grid-column: 2 / -1;
grid-row: 3 / 4;
}
/* SUMMARY TILE */
.summary {
grid-column: 1 / span 3;
grid-row: 4 / 5;
}
/* SMALL SCREENS */
@media (max-width: 600px) {
.layout {
grid-template-columns: minmax(0, 1fr);
}
.tile {
grid-column: auto;
grid-row: auto;
}
}<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Place and span Grid items</title>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<!-- LAYOUT: Add your main element below this comment. -->
<main class="layout">
<div class="tile lead">Study dashboard</div>
<div class="tile menu">Your topics</div>
<div class="tile content">Today’s practice</div>
<div class="tile notes">Review notes</div>
<div class="tile summary">One small win complete</div>
</main>
</body>
</html>Code and completed steps save in this browser when signed out. Sign in to save across devices.
Choose the copy to continue. Your account work will only be replaced if you choose this device.
Ready to checkRun the checks to see your results here.